microsoft / microsoft/vscode-js-debug

Node.js paths on macOS are case sensitive

Open
#1,682 7 comments 0 reactions 1 assignee View on GitHub

@connor4312 is already working on this.

Since Apr 27, 2023.

bug
Dominant language
TypeScript
Stars
2k
Forks
373
Avg merge
1d 9m
Merged PRs (30d)
6

Description

Describe the bug
Cannot find source map.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://github.com/microsoft/TypeScript
  2. Run npx hereby watch-min
  3. Use the following launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Mocha Tests (currently opened test)",
            "runtimeArgs": ["--nolazy"],
            "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
            "args": [
                "-u",
                "bdd",
                "--no-timeouts",
                "--colors",
                "built/local/run.js",
                "-f",
                // You can change this to be the name of a specific test file (without the file extension)
                // to consistently launch the same test
                "${fileBasenameNoExtension}",
                "--skip-percent",
                "0"
            ],
            "env": {
                "NODE_ENV": "testing"
            },
            "outFiles": [
                "${workspaceFolder}/built/**/*.js",
                "${workspaceFolder}/built/**/*.mjs",
                "${workspaceFolder}/built/**/*.cjs",
                "!**/node_modules/**"
            ],
            "sourceMaps": true,
            "smartStep": true,
            "preLaunchTask": "npm: build:tests",
            "console": "integratedTerminal",
            "customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue"
        },
        {
            // See: https://github.com/microsoft/TypeScript/wiki/Debugging-Language-Service-in-VS-Code
            "type": "node",
            "request": "attach",
            "name": "Attach to VS Code TS Server via Port",
            "customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue",
            "sourceMaps": true,
            "outFiles": ["${workspaceFolder}/built/local/*.js", "!**/node_modules/**"],
            "enableTurboSourcemaps": true,
            "port": 5667,
            "trace": true
        },
        {
            "type": "node",
            "name": "Launch VSCode",
            "request": "launch",
            "runtimeExecutable": "${execPath}",
            "args": ["--user-data-dir=${workspaceFolder}/.vscode/.vscode-debug", "${workspaceFolder}/../"],
            "env": {
                "TSS_DEBUG": "5667",
                "NODE_ENV": "development"
            }
        }
    ]
}

Start VSCode and then attach to the language service.

Log File

vscode-debugadapter-cff4305c.json.gz

I found there is something strange happened in the logfile:

image

Version: 1.77.3 (Universal)
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
Date: 2023-04-12T09:19:37.325Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Darwin arm64 22.4.0
Sandboxed: No

JavaScript Debugger (Nightly)
v2023.4.1317

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.