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

Debug does not stop in subprojects #47

Closed
eiswind opened this issue Aug 13, 2022 · 10 comments
Closed

Debug does not stop in subprojects #47

eiswind opened this issue Aug 13, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@eiswind
Copy link

eiswind commented Aug 13, 2022

Describe the Bug

Create a new Angular (or even plain Typescript) project. Try to Debug. Works.
Move Angular project to a subfolder, create settings.json

{
    
    "karmaTestExplorer.logLevel": "debug",
    "karmaTestExplorer.karmaLogLevel": "debug",
    "karmaTestExplorer.projects":["bulletin-board"]
}

Debug does not stop at any breakpoint anymore.

Node Version: 16
VS Code Version: 1.70.1
Karma Version: 6.4
Frameworks: (e.g. Angular, Jasmine, Mocha) Angular, Jasmine
@eiswind eiswind added the bug Something isn't working label Aug 13, 2022
@lucono
Copy link
Owner

lucono commented Aug 16, 2022

I'm able to reproduce this. A workaround you can try is to set the karmaTestExplorer.webRoot setting to the project path as well:

{
  "karmaTestExplorer.projects": ["bulletin-board"],
  "karmaTestExplorer.webRoot": "${workspaceFolder}/bulletin-board"
}

In a future release, the webRoot can be defaulted to the project path so that it should work without any special configuration.

@eiswind
Copy link
Author

eiswind commented Aug 17, 2022

Thanks for the workaround. but would this work if i have multiple projects in my workspace?

@lucono
Copy link
Owner

lucono commented Aug 19, 2022

No, the workaround will only work for a single project in karmaTestExplorer.projects. I'll add a fix to the next release that should address it for multi-project setups.

@lucono
Copy link
Owner

lucono commented Aug 23, 2022

@eiswind Try out the fix in the beta branch to confirm if it resolves the issue. You can use the vsix from the CI build, or build it yourself from the beta branch.

@eiswind
Copy link
Author

eiswind commented Aug 24, 2022

found it a little surprising that I had to change karmaTestExplorer.projects to "karmaTestExplorer.projectWorkspaces".
Debugging works at my side w/o setting webroot.

@lucono
Copy link
Owner

lucono commented Aug 25, 2022

For someone working with a single project which is an Angular workspace, the current naming of karmaTestExplorer.projects is not very intuitive as it could potentially be confused to mean the projects in the Angular workspace. The rename to karmaTestExplorer.projectWorkspaces is intended to avoid that confusion. The old naming will continue to work even with the rename, but the plan is to remove it at some point in a future update.

If you believe the new naming to be less intuitive, I'd be open to thoughts for a different name for that setting.

@eiswind
Copy link
Author

eiswind commented Aug 25, 2022

I just found that it did not work without renaming. It complained that karma could not be found (which I think is because it did not check the folder)

@lucono
Copy link
Owner

lucono commented Aug 25, 2022

Thanks, fixed in beta branch. Use updated vsix to confirm.

@eiswind
Copy link
Author

eiswind commented Aug 26, 2022

I can confirm that both settings are working now.

@lucono
Copy link
Owner

lucono commented Aug 27, 2022

Released in v0.7.4

@lucono lucono closed this as completed Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants