Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging node.js in Visual Studio Code preview on OS X

I'm trying out the newly released Visual Studio Code preview on Mac OS X, when trying to start debugging or attaching to my node.js app I get the error "Cannot start OpenDebug because Mono (or a Mono version >= 3.10.0) is required".

I have installed the Mono MDK from http://www.mono-project.com/download/.

What do I need to do to get debugging working in VSCode preview?

like image 371
monowerker Avatar asked Apr 29 '15 23:04

monowerker


People also ask

How do you debug node in visual code?

The easiest way to start a debugging session in Visual Studio Code is to open a file in the editor, click the Run View icon in the Activity Bar (or press Ctrl+Shift+D on your keyboard), followed by the Run and Debug button at the top left corner of the application.

How do I enable JavaScript debugging in Visual Studio Code?

Open the extensions view (ctrl+shift+x) and search for @builtin @id:ms-vscode. js-debug. Right click on the JavaScript Debugger extension and select Switch to Pre-Release Version . Reload VS Code.

Why my debugger is not working in VS Code?

The most common problem is that you did not set up launch. json or there is a syntax error in that file. Alternatively, you might need to open a folder, since no-folder debugging does not support launch configurations.

Which CLI option can you use to debug a node?

A minimal CLI debugger is available with node inspect myscript. js . Several commercial and open source tools can also connect to the Node. js Inspector.


1 Answers

I did a brew install mono and the problem went away the next time I hit the run button.

Unfortunately, I have no idea why the MDK installer wouldn't work for you. This was an optimal solution for me since I use homebrew for most other development tools already.

like image 158
natevw Avatar answered Sep 20 '22 12:09

natevw