Universal: there is no way to debug when running with ssr-dev-server

Created on 16 Apr 2020  路  8Comments  路  Source: angular/universal

Hi there. Before angular v9 I was using the nodemon for running ssr in dev environment but after the v9 I've switched to use @nguniversal/builders:ssr-dev-server. And now I'm unable to debug the server or ssr code.

Is there any way I can pass any argument to @nguniversal/builders:ssr-dev-server to make it run in the inspect mode?

It'll be better to see it there.

builders bufix

Most helpful comment

Same happens to me !! it would be nice to have a guideline to proper config debug settings for node code, having universal as engine.

All 8 comments

That鈥檚 seems like an oversight. Thanks for pointing this out.

I鈥檒l look at this in a the coming days

Any news on this? It would be nice to be able to debug with vscode. Thanks !

Same happens to me !! it would be nice to have a guideline to proper config debug settings for node code, having universal as engine.

Same issue !

+1

Hi @alan-agius4 !! How are you?? I would like to know if you have an example of how to configure the VSCode debugger to run the app (ng run my-app:serve-ssr) in inspect mode. Thanks!!

@tincho-despegar, here's the vs configuration needed.

{
    // 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",
            "request": "attach",
            "name": "Debug SSR Server",
            "port": 9229,
            "skipFiles": [
                "<node_internals>/**"
            ]
        }
    ]
}

To run the server application in inspect mode you can use the below;

yarn dev:ssr --inspect

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

jeffwhelpley picture jeffwhelpley  路  6Comments

daright picture daright  路  6Comments

dmitriytretyakov picture dmitriytretyakov  路  5Comments

moczix picture moczix  路  5Comments

PatrickJS picture PatrickJS  路  5Comments