Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

break point not working #132119

Closed
1057437122 opened this issue Sep 2, 2021 · 11 comments
Closed

break point not working #132119

1057437122 opened this issue Sep 2, 2021 · 11 comments
Assignees
Labels
*as-designed Described behavior is as designed info-needed Issue requires more information from poster

Comments

@1057437122
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version:
  • OS Version:

Steps to Reproduce:

1.upgrade to latest vscode => 1.59.1
2.start an expressjs + typescript project
3.create a launch.json file:

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "trace": true,
      "request": "launch",
      "name": "Launch Program",
      "skipFiles": [
        "<node_internals>/**"
      ],
      "program": "${workspaceFolder}/index.js",
      "preLaunchTask": "tsc: build - tsconfig.json",
      "outFiles": [
        "${workspaceFolder}/dist/**/*.js"
      ],
    }
  ]
}

  1. start debugger:

the debugger started in a second, even it's still building the project, and after a while the debug console panel doesn't have any logs. I tested the project with curl or chrome, the project is running, cuz I got the expected results. I created a break point , but it didn't stop there.
When I stop the debugger, the debug console panel start to show all the logs: request log, debug log and so on...

@connor4312
Copy link
Member

/jsDebugLogs

@1057437122
Copy link
Author

connor@xbox.com

Captura de pantalla 2021-09-03 a las 11 54 47

Thanks, I've sent the full log to that email, and I think the useful information I found is on this picture, but I don't know how to solve the problem.

I have also tried this:

$:sudo rm -rf $HOME/Library/Application\ Support/Code
$:sudo rm -rf $HOME/.vscode-react-native
$:sudo rm -rf $HOME/.vscode

and uninstall vscode application.

After a restarting of my computer, I reinstalled from brew.
After the new clean installation, the breakpoint worked! But only once, after I changed some of my code in my project and restarted the debugger(my expressjs + typescript project), the breakpoint stoped working again! But this time is a little different, before this, the breakpoint said is unbound, but this time the breakpoint status seemed correct, which means its color is red , but it never stop at the breakpoint.

I also tried another Python project, same error, breakpoint added successfully and its color is red, but it never stop at these points.

@connor4312
Copy link
Member

It looks like you're starting your program with "Run Without Debugging" (i.e. not in debug mode). This prevents breakpoints from being bound -- in any runtime.

You can use F5 or the green arrow in the Debug view to start your program in debug mode.

@connor4312 connor4312 added the *as-designed Described behavior is as designed label Sep 3, 2021
@1057437122
Copy link
Author

How to "Run Withou Debugging" ?

There're three ways here in my computer:

  1. press F5 => debugger started and breakpoint said: unbound breakpoint( color grey)
  2. press green arrow in the Debug view => same as using F5
  3. press green arrow in touch bar(mac book pro) => breakpoint status seem correct(red), but it never stop at these points.

I think none of the three works as-designed

@connor4312
Copy link
Member

If it's grey that means you are debugging but the breakpoint didn't bind. If you get a trace log in that state, I can take a look at it.

@1057437122
Copy link
Author

1057437122 commented Sep 3, 2021 via email

@1057437122
Copy link
Author

sorry I just found I didn't put the log here, now I did:
vscode-debugadapter-a262c5b2.json.gz
thanks for your help

@jakawell
Copy link

jakawell commented Sep 7, 2021

We are experiencing a similar issues. We're running Mocha tests in Node with TypeScript. Breakpoints worked fine in 1.59, but once we upgraded to 1.60, the debugger does not stop at breakpoints.

If we set a breakpoint using the JS keyword debugger, it will stop at that line, but it does so in a separate read-only instance of the file.

@connor4312
Copy link
Member

@jakawell there's a good chance this will fix it for you: microsoft/vscode-js-debug#1100 (comment)

@jakawell
Copy link

jakawell commented Sep 7, 2021

@connor4312 Aha, perfect. That solved our issue. Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants
@connor4312 @1057437122 @jakawell and others