question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pwa-node race condition, skipping breakpoints

See original GitHub issue

Describe the bug

In the ‘newest’ version of vscode, pwa-node attach and launch alone with an explicit port defined.

{
    // 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": [
        {
            "name": "Attach",
            "port":51061,
            "request": "attach",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "type": "pwa-node"
        },
        
        {
            "name": "Launch Program",
            "program": "${workspaceFolder}/parseuszips.js",
            "request": "launch",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "type": "pwa-node"
        },   
    ]
}

I have no idea why the debugger is choosing that port, but it does not connect otherwise to the debugging session. Anyway the major issue is in the title, the breakpoints are not hit. And this place is filled with very strange people we dont like.

Anyway, earlier breakpoints are not being hit, the debugging process is not waiting for the ide to attach, Later breakpoints however are reached,

To Reproduce Create pwa-node type for attach and launch in launch,json file under .vscode

Set breakpoints throughout the file

Run the app.

Log File

vscode-debugadapter-0.json.gz

VS Code Version: 1.48.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
makingglitchescommented, Aug 27, 2020

wouldn’t life be grand if people just left shit stand, not like their constant dodging crap is doing them or anyone else any favors.

0reactions
connor4312commented, Aug 27, 2020

Actually, I was able to repro this in Node 10.1.0, which is what you’re using. This is a known bug in Node, which I thought was fixed by 10.0.0 but is apparently in a minor point release prior to their LTS at 10.13.0. We have not added mitigations in js-debug for this scenario, as doing so is a structural change for a version of Node which is at its end of life.

You can safely update to a more recent Node 10.x version (such as 10.22.0), or update to Node 14 for additional features and performance. This is also advisable in general, as Node 10 versions prior to 10.13 are not LTS and therefore do not receive security updates.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Race condition in node_save() when not using DB for ... - Drupal
Problem/Motivation. With a non-DB backed cache, updating nodes can result in stale data being in the cache due to a race condition.
Read more >
How to debug a Node.js server? The debugger skips my ...
However some breakpoints in modules imported by server.js are skipped and I'm not sure why. Other breakpoints in Next components do work when...
Read more >
Web Standards Are Cool Again - Remix Guide
In this video we'll explain the basics of HTTP caching, how web browsers respond to it, and how CDNs take advantage of it,...
Read more >
Debugging Friday — Hunting down race condition - Medium
So, I'm adding a Breakpoint in the method responsible for checking monitored process to ensure that there is no bug there (events could...
Read more >
OWASP TESTING GUIDE
4.4.10 Testing for Race Conditions (OWASP-AT-010) . ... To prevent reoccurring security problems within an application, it is essential to build security ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found