Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode Chrome Debugger: Cannot watch any variables

Tags:

I've installed the Chrome Debugger Extension for VS Code to debug my Angular project. Debugging itself works fine however I just cant watch any variables in the watch panel. It keeps saying "not available" even though they should be.

enter image description here

like image 340
Ekos Avatar asked Jan 30 '18 10:01

Ekos


People also ask

How do I configure Chrome debugger in Visual Studio Code?

To debug any project in either Chrome or Microsoft Edge, all you need to do is to start a session by pressing F5 or activating the debug icon in the menu bar and selecting “Run and debug”. Alternatively, you can also use the Visual Studio Code command palette and run the “Debug: Open Link” command.

How do I enable vscode debugging?

To bring up the Run and Debug view, select the Run and Debug icon in the Activity Bar on the side of VS Code. You can also use the keyboard shortcut Ctrl+Shift+D. The Run and Debug view displays all information related to running and debugging and has a top bar with debugging commands and configuration settings.

What is launch json in vscode?

A launch. json file is used to configure the debugger in Visual Studio Code. Visual Studio Code generates a launch. json (under a . vscode folder in your project) with almost all of the required information.


1 Answers

you have to set some breakpoints within some function call by double-clicking some line number; hit F5 to start debug mode, only then you can inspect the variables in that context/scope

enter image description here

like image 95
David Filipe Lopes Domingues Avatar answered Oct 02 '22 20:10

David Filipe Lopes Domingues