Repository navigation
Debug points getting hit but no visual indication when debugging nodejs (mocha tests) #68616
Copy link
Copy link
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuesimportantIssue identified as high-priorityIssue identified as high-priorityrelease-notesRelease notes issuesRelease notes issuesverifiedVerification succeededVerification succeeded
Milestone
Description
Issue Type: Bug
When I try to debug node js app I see execution stops at certain breakpoints which are set but vscode doesn't highlight that point.
Launch.json for debugging
{
"type": "node",
"request": "launch",
"name": "Mocha All",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-r",
"ts-node/register",
"--timeout",
"999999",
"--colors",
"${workspaceRoot}/test/**/*.test.ts"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"protocol": "inspector",
"env": {
"NODE_CONFIG_DIR":"./src/config",
"NODE_ENV": "test"
}
VS Code version: Code 1.31.1 (1b8e830, 2019-02-12T02:16:38.656Z)
OS version: Darwin x64 17.7.0
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800) |
| GPU Status | 2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: enabled rasterization: enabled surface_synchronization: enabled_on video_decode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | 2, 2, 3 |
| Memory (System) | 16.00GB (0.52GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
Extensions (23)
| Extension | Author (truncated) | Version |
|---|---|---|
| npm-intellisense | chr | 1.3.0 |
| path-intellisense | chr | 1.4.2 |
| vscode-eslint | dba | 1.8.0 |
| es7-react-js-snippets | dsz | 2.0.1 |
| vscode-html-css | ecm | 0.2.0 |
| flow-for-vscode | flo | 1.0.1 |
| vscode-styled-components | jpo | 0.0.25 |
| graphql-for-vscode | kum | 1.13.0 |
| dotenv | mik | 1.0.1 |
| vsliveshare | ms- | 0.3.1182 |
| debugger-for-chrome | msj | 4.11.1 |
| color-highlight | nau | 2.3.0 |
| quicktype | qui | 12.0.46 |
| java | red | 0.38.0 |
| autoimport | ste | 1.5.3 |
| vscode-java-debug | vsc | 0.16.0 |
| vscode-java-dependency | vsc | 0.3.0 |
| vscode-java-pack | vsc | 0.5.0 |
| vscode-java-test | vsc | 0.14.0 |
| vscode-maven | vsc | 0.14.2 |
| vim | vsc | 1.0.8 |
| vscode-wakatime | Wak | 1.2.5 |
| vscode-import-cost | wix | 2.12.0 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesDebug viewlet, configurations, breakpoints, adapter issuesimportantIssue identified as high-priorityIssue identified as high-priorityrelease-notesRelease notes issuesRelease notes issuesverifiedVerification succeededVerification succeeded
Activity
[-]Debug points getting hit but no visual indication when debugging mocha[/-][+]Debug points getting hit but no visual indication when debugging nodejs (mocha tests)[/+]weinand commentedon Feb 13, 2019
When this happens could you please open the "Dev Tools" with the "Toggle Developer Tools" action and see whether there are any errors in the console.
Bilchuck commentedon Feb 13, 2019
I have the same issue. I am debugging Nest js application and debugger works very strange after VS code update.
My config:
weinand commentedon Feb 13, 2019
Anton Bilchuck (@Bilchuck) When this happens could you please open the "Dev Tools" with the "Toggle Developer Tools" action and see whether there are any errors in the console.
ashelopukho commentedon Feb 13, 2019
I have the same problem when trying to debug CRA (Create react app) via Chrome debug extension for VSCode. (just checked prev vscode version 1.30.2 - and it works without problems)
Bilchuck commentedon Feb 13, 2019
Andre Weinand (@weinand) There are no errors in console
Bilchuck commentedon Feb 13, 2019
Andre Weinand (@weinand)

When I enter the variable name to debug console for reading it's value it sends me from my .ts file to this javascript.
Also, I don't have access to any local variables. So debugger is not working at all. It just stops the process and can be resumed.
Bilchuck commentedon Feb 13, 2019
Andre Weinand (@weinand) But I can use debugger port provided by VS code in chrome inspector and debug there without problems.
Hope my comments will help you to fix the issue
23 remaining items
isidorn commentedon Feb 21, 2019
Andre Weinand (@weinand) thanks for the great repro steps
The top stack frame can be deemphesized so try to focus again
weinand commentedon Feb 24, 2019
Isidor Nikolic (@isidorn) this needs to be verified for all issues resolved as duplicates (e.g. C++, PowerShell).
Maybe we need a test-item...
isidorn commentedon Feb 25, 2019
The code is the same for all debug types, I would just like that we verify for one. So no test item needed.
weinand commentedon Feb 25, 2019
Isidor Nikolic (@isidorn) sure, the fix is debug type independent (which is true for 99.9% of all VS Code fixes). The question is whether your fix really covers all issues we were seeing in different debuggers. This cannot be proved by just verifying for node-debug.
isidorn commentedon Feb 25, 2019
Andre Weinand (@weinand) I have removed the duplicate from those issues so they also get verified
gombosg commentedon Mar 2, 2019
I'm getting the same error when doing Jest tests with the VSCode extension. Problem is that by default when I click "debug" in the code lens, VSCode just auto attaches to the jest tester:
It hits my breakpoints and clicking on the top stack frame entry does reveal the line. The top entry in the stack is greyed out by default.
Can't seem to turn off smartStep for auto attach, and right click - toggle skipping this file in stack list doesn't work.
EDIT: creating a manual debug config with smartStep off works.
(VSCode 1.31.1)
roblourens commentedon Mar 3, 2019
Gergely Gombos (@gombosg) it's not fixed in 1.31. Please try in Insiders