Angular-cli: Question: Use VS Code Debugging in CLI project, i.e. use F5 to launch project, and debug in VS Code?

Created on 2 Mar 2017  路  5Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

Windows 10.

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
@angular/cli: 1.0.0-rc.0
node: 7.6.0
os: win32 x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-rc.0
@angular/compiler-cli: 2.4.8

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
Trying to use F5 to launch CLI project in VS Code.

The log given by the failure.

Normally this include a stack trace and some more information.
NA

Mention any other details that might be useful.

I am trying to find a supported way to enable debugging a CLI project in VS Code by launching the application using F5.


Thanks! We'll be in touch soon.

Most helpful comment

I've been able to debug in VSCode using the Debugger for Chrome extension, and a launch config similar to this:

 {
            "name": "Launch Client",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:4200/#",
            "port": 9223,
            "sourceMaps": true,
            "diagnosticLogging": true,
            "webRoot": "${workspaceRoot}",
            "runtimeArgs": [
                "--disable-session-crashed-bubble",
                "--disable-infobars"
            ],
            "userDataDir": "${workspaceRoot}/.vscode/chrome"
        }

It doesn't actually start the app inside VSCode, but if you start it outside (ng serve) then you can hit F5 to launch the debugger part.

All 5 comments

I've been able to debug in VSCode using the Debugger for Chrome extension, and a launch config similar to this:

 {
            "name": "Launch Client",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:4200/#",
            "port": 9223,
            "sourceMaps": true,
            "diagnosticLogging": true,
            "webRoot": "${workspaceRoot}",
            "runtimeArgs": [
                "--disable-session-crashed-bubble",
                "--disable-infobars"
            ],
            "userDataDir": "${workspaceRoot}/.vscode/chrome"
        }

It doesn't actually start the app inside VSCode, but if you start it outside (ng serve) then you can hit F5 to launch the debugger part.

When I use the above configuration I get an exception on the polyfills.bundle.js

Thank you! Works with this configuration.

Closing as fixed.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

purushottamjha picture purushottamjha  路  3Comments

sysmat picture sysmat  路  3Comments

hareeshav picture hareeshav  路  3Comments

IngvarKofoed picture IngvarKofoed  路  3Comments

jmurphzyo picture jmurphzyo  路  3Comments