3

playing around with the newly released VSCode Editor/IDE. I wanted to try out debugging on a very basic Node.JS CLI application, which uses the "prompt" npm package:

prompt.start();
prompt.get(schema, function (err, result) { ...

When I set some breakpoints and start the app debugging, VSCode just steps over the prompt.get() and hangs in the debug process until I force to stop it, which ends in an error "OpenDebug process has terminated unexpectedly".

I expected VSCode to open up a shell that I can interact with.

My guess is that it's just not implemented the right way yet, but probably I just couldn't figure it out...

4

1 回答 1

6

On Linux Visual Studio Code does not yet open a terminal for the program to be debugged, so there is no way to interact with it through the command line. As a workaround you can launch the node program from a terminal in debug mode and attach to it from VSCode. I have created a bug on our side and will make sure it’s fixed with the next release.

Andre Weinand, Visual Studio Code

于 2015-05-04T09:25:39.283 回答