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

Debugging in VS Code #1371

Open
etherealHero opened this issue Aug 20, 2024 · 4 comments
Open

Debugging in VS Code #1371

etherealHero opened this issue Aug 20, 2024 · 4 comments
Labels
lsp Language Server Protocol or other VSCode issues

Comments

@etherealHero
Copy link

I understand that it is the civet extension's responsibility to implement debugging in vs code. It would be really cool to use breakpoints just like in typescript. So far I have found a temporary solution to use the "debugger" instruction or "console.log", it refers to the compiled file, but this is not so convenient (I want to use logging points, etc.).

image

Have you tried anything in this direction? Could this opportunity appear in the future?

@edemaine edemaine added the lsp Language Server Protocol or other VSCode issues label Aug 20, 2024
@edemaine
Copy link
Collaborator

I hadn't tried debugging a Civet script, but given that error message it seems like there's hope of getting it working. Thanks for the report.

@STRd6
Copy link
Contributor

STRd6 commented Aug 20, 2024

It should be as simple as making sure we are setting the correct sourcemap in the correct place.

In your build script do you have sourcemap: true or sourcemap: 'inline'?

Sourcemapping is working for me when debugging in Chrome but maybe there is something we need to add to the extension.

@etherealHero
Copy link
Author

etherealHero commented Aug 21, 2024

I tried installing an inline sourcemap, but it didn't work. In general, in vs code there is no way to set breakpoints, this is what is needed. I thought it would be better to set up gulp (Just, I made sure that you have a gulp plugin for civet 😊) and combine it with bundler so that I have a civet source layer and a .ts distribution that is given to the bundler. And there I can already use all the features for ts debugging

@STRd6
Copy link
Contributor

STRd6 commented Aug 23, 2024

Ok, so it's probably something we need to do in the LSP to enable setting breakpoints in the VSCode IDE.

Thanks for the report! Hopefully we can get to it the next time we're working on the LSP code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lsp Language Server Protocol or other VSCode issues
Projects
None yet
Development

No branches or pull requests

3 participants