GithubHelp home page GithubHelp logo

Comments (9)

JeremyTCD avatar JeremyTCD commented on August 19, 2024

Hey! Your argument passing looks fine to me. You'll need to specify a return type though.

Your C#:

var image = await StaticNodeJSService.InvokeFromFileAsync("test_nodejs_script.js", args: new [] { exportSettings });

Expected C#:

var image = await StaticNodeJSService.InvokeFromFileAsync<your return type here>("test_nodejs_script.js", args: new [] { exportSettings });

Your return type must be a JSON-serializable type, string, or Stream.

As for debugging: instructions, example options.

Let me know if you need further help.

from javascript.nodejs.

markzolotoy avatar markzolotoy commented on August 19, 2024

Thanks for your help. I still cannot get debugging going. I added debugger statement to my JS code. I also have Nodejs console open, but it's not getting into debugging.

from javascript.nodejs.

JeremyTCD avatar JeremyTCD commented on August 19, 2024

I've created an example project:

  • Clone and run
  • Navigate to chrome://inspect/ in Chrome
  • Click "Open dedicated DevTools for Node" and wait for the debugger to attach

from javascript.nodejs.

markzolotoy avatar markzolotoy commented on August 19, 2024

It worked just once, after that is not attaching to the Browser no matter what.

from javascript.nodejs.

markzolotoy avatar markzolotoy commented on August 19, 2024

In Edge I am getting into this:
image

from javascript.nodejs.

markzolotoy avatar markzolotoy commented on August 19, 2024

When I run it in the VS2019 I get command window open which says:
C:\Test.NodeJS.Debugging-main\bin\Debug\netcoreapp3.1\Test.NodeJS.Debugging.exe (process 4156) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .

from javascript.nodejs.

markzolotoy avatar markzolotoy commented on August 19, 2024

I cleaned up a little and now command window opens blank, but still no debugging.

from javascript.nodejs.

markzolotoy avatar markzolotoy commented on August 19, 2024

After killing the running process once the next run will have:
C:\Test.NodeJS.Debugging-main\bin\Debug\netcoreapp3.1\Test.NodeJS.Debugging.exe (process 4156) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .
Which makes debugging pointless.
Killing node.js processes will help to recover debugging session in VS but no debugging in Chrome.

Now I am getting:
No devices detected. Please read the remote debugging documentation to verify your device is enabled for USB debugging.

Do you have another example?

from javascript.nodejs.

JeremyTCD avatar JeremyTCD commented on August 19, 2024

The example project works on my machine. Unfortunately this looks like a machine-specific issue. Closing for now, feel free to open a new issue if you have questions.

from javascript.nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.