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

DAP pack in astrocommunity.pack.typescript is missing typescript dap support #148

Open
citosid opened this issue Apr 16, 2023 · 26 comments
Open

Comments

@citosid
Copy link

citosid commented Apr 16, 2023

I have this error with the typescript pack:

Error executing luv callback:
.../.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1187: adapter.port is required for server adapter
stack traceback:
	[C]: in function 'assert'
	.../.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1187: in function <.../.local/share/nvim/lazy/nvim-dap/lua/dap/session.lua:1179>

I already deleted ~/.cache/nvim and ~/.local/nvim and performed a very clean installation and the same error happens.

The adapter is being executed:

image

Due to this, if I try again after executing the debug the first time, it fails with another error saying there is already another process running (which makes sense...)

Any ideas what could be wrong?

@luxus
Copy link
Member

luxus commented Apr 17, 2023

please provide a :checkhealth in a gist

@citosid
Copy link
Author

citosid commented Apr 18, 2023

@citosid
Copy link
Author

citosid commented Apr 18, 2023

@luxus I did an installation from scratch installing only the example_user repo and only this pack and is the same error. These are the steps I followed:

git clone [email protected]:/AstroNvim/AstroNvim ~/.config/Test
git clone https://github.com/AstroNvim/user_example ~/.config/Test/lua/user
# Modify the file ~/.config/Test/lua/user/plugins/community.lua and add the typescript pack
NVIM_APPNAME=Test nvim

Open a very basic typescript file, add a break point, start the debugger, and the same error happens

@citosid
Copy link
Author

citosid commented Apr 19, 2023

@luxus more information:

I decided to try and make work the main nvim-dap-vscode-js by itself, and found this: mxsdev/nvim-dap-vscode-js#14 (comment)

Based on that, I think the issue in this pack is the same. It is trying to use js-debug-adapter which is the default adapter provided by Microsoft. However, I read somewhere the author of nvim-dap-vscode-js found the one provided by Microsoft is not really dap compatible, due to some things having to be asynchronous (I can't find the comment now, maybe @mxsdev can comment?).

So, the solution would be changing the pack to some configuration similar to the one I have in that other issue. However, I'm not sure if I'm the only one with this issue or if you (or @mehalter) as the original creators of the pack have more comments about it...

@luxus
Copy link
Member

luxus commented Apr 22, 2023

@owittek @Uzaaft help

@owittek
Copy link
Member

owittek commented Apr 22, 2023

I can confirm that I've also been having issues with the DAP starting and ignoring breakpoints, I've just assumed that it's been a misconfiguration on my part.

@Uzaaft
Copy link
Member

Uzaaft commented Apr 22, 2023

@luxus We should take a look at abz's stuff, it worked perfectly fine.

@luxus
Copy link
Member

luxus commented Apr 22, 2023

Feel free :)

@Uzaaft
Copy link
Member

Uzaaft commented Apr 22, 2023

Feel free :)

Can masta give dobby a sock?
Jk, looking into it

@Uzaaft
Copy link
Member

Uzaaft commented Apr 23, 2023

I've got DAP working with JS. It's not ignoring breakpoints here for me. TS is another story...

@Uzaaft
Copy link
Member

Uzaaft commented Apr 24, 2023

#160 Should fix this. Could you test that PR? @citosid

@owittek
Copy link
Member

owittek commented May 1, 2023

I have removed the DAP configuration from the TypeScript pack while we're working on a solution.

@citosid
Copy link
Author

citosid commented May 5, 2023

#160 Should fix this. Could you test that PR? @citosid

Sorry. Was in the middle of a release.

I have the configuration I linked previously and works flawlessly.

Is the other PR ready?

@Uzaaft
Copy link
Member

Uzaaft commented May 5, 2023

@citosid I'll have to test that one.
cc @owittek

@Uzaaft
Copy link
Member

Uzaaft commented May 7, 2023

Just a heads up. I'll take a look at this after 15th of May

@luxus
Copy link
Member

luxus commented May 27, 2023

@Uzaaft just a heads up. the 15th of May is nearly a year away

@Uzaaft
Copy link
Member

Uzaaft commented May 27, 2023

@luxus Thanks for the reminder! I should plan the PR so that I don't miss forget the date!

@Uzaaft
Copy link
Member

Uzaaft commented Jul 2, 2023

Deno TS + JS and node JS daps are implemented.

@Uzaaft
Copy link
Member

Uzaaft commented Jul 24, 2023

JS dap has been released.
Deno dap support will be released during this week. TS + node is a WIP but I'm also on it.

@jharlow
Copy link
Contributor

jharlow commented Nov 10, 2023

Super keen to see the TS + node one!

@Uzaaft Uzaaft changed the title error with astrocommunity.pack.typescript DAP pack in astrocommunity.pack.typescript is missing typescript dap support Dec 16, 2023
@Uzaaft
Copy link
Member

Uzaaft commented Jan 16, 2024

@jharlow @citosid I believe we got a fix for this. I'll roll it a seperate branch if you guys would like to try it out :)

@luxus
Copy link
Member

luxus commented Jan 20, 2024

looks like it will be really after 15. of may :D

@citosid
Copy link
Author

citosid commented Jan 20, 2024

Thanks @Uzaaft! Unfortunately I ended up creating my own integration and actually moved out of AstroNvim. Now I have my own configuration without any distribution.

Thanks for all your work though! I'm sure all the devs that use AstroNvim will love to try this out!

@Uzaaft
Copy link
Member

Uzaaft commented Jan 20, 2024

@citosid No worries, good luck with your own config :) Do you have a link to your integration? 👀

@citosid
Copy link
Author

citosid commented Jan 21, 2024

@Uzaaft, is the same that I posted above. Right now I'm in the process of migrating to a more simpler neovim configuration. You can see the dot files here: https://github.com/citosid/vim although it does not have the dap configuration yet.

@jharlow
Copy link
Contributor

jharlow commented Feb 27, 2024

@Uzaaft Yeah I'd be keen to try it if you have a branch to link me! Thank you!

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