6

I am using this project template. And i set a breakpoint into App class in App.tsx file. Shared configurations below. nothing look wrong but it doesnt work even "F5" not trigg anything.

I searched many but couldnt find any proper solution.. launch.json:

"version": "0.2.0",
    "configurations": 
    [

        {
            "args": [],
            "cwd": "${workspaceRoot}",
            "env": {
                "NODE_ENV": "development"
            },
            "externalConsole": false,
            "name": "DEBUG",
            "outDir": "${workspaceRoot}/build/dist",
            "preLaunchTask": "compile",
            "program": "${workspaceRoot}/src/App.tsx",
            "request": "launch",
            "runtimeArgs": [
                "--nolazy"
            ],
            "runtimeExecutable": null,
            "sourceMaps": true,
            "stopOnEntry": false,
            "type": "node"
        }
    ]

tsconfig:

{
  "compilerOptions": {
    "outDir": "build/dist",
    "module": "commonjs",
    "target": "es5",
    "lib": ["es6", "dom"],
    "sourceMap": true,
    "allowJs": true,
    "jsx": "react",
    "moduleResolution": "node",
    "rootDir": "src",

here is debug config name and breakpoint: enter image description here

and working directory:

enter image description here

1 Answer 1

4

You are unable to debug it because the application you are running is client side (executed in browser) whereas out of the box VSCode supports debugging of the server side (nodejs for example) typescript applications.

You can debug your app by installing the Debugger for Chrome extension and following their guidelines.

Or as alternative - debug it inside chrome using its dev tools.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.