Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with NWjs + angular? #27

Open
ka1izer opened this issue Nov 4, 2019 · 0 comments
Open

Does not work with NWjs + angular? #27

ka1izer opened this issue Nov 4, 2019 · 0 comments

Comments

@ka1izer
Copy link

ka1izer commented Nov 4, 2019

Hi,

Launching NWjs correctly works, but it fails to attach, timing out saying "Cannot connect to runtime process, timeout [...] (reason: Can't find a valid target that matches: chrome-extension://*/http://localhost:4200/client/no. Available pages: [[...]_generated_background_page.html]). "

Before it times out, I can manually open "http://127.0.0.1:9223/json/list" and see two entries, one for the _generated_background_page.html, and one for our app (BUT with url = "http://localhost:4200/client/no/login")

(In package.json: main = http://localhost:4200/client/no)

The problem seems to be that the extension expects the url to be prefixed with "chrome-extension://*/", and ng server (?) has redirected or something, so it isn't prefixed...

For now, I have solved this by specifying urlFilter = "http://localhost:4200/client/no/*" in launch.json, and manually editing the source of the extension, so that it always uses args.urlFilter, never launchUrl to find process to attach to. (Line 134 in chromeDebugAdapter.js).

Am I way off here? Is there another way to fix this?

(Another point: We have our angular app project in one folder and nwjs setup (package.json etc) in another, and need to set webRoot = angular-folder and cwd = nwjs-folder to get breakpoints to work. If we do that, the default extension tries to find chrome-extension://*/index.html, (because it gets the url from the angular package.json, I assume). I don't really see how we could set this up so the unmodified extension would work... )

Latest version (1.0.18) of Debugger for NWjs, latest version of VsCode (1.39.2).
Windows 10.
Angular 8.
NWjs 0.41.2/0.42.1 (same for both).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant