-
Notifications
You must be signed in to change notification settings - Fork 41
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
Debugger support? #10
Comments
Thanks for opening the issue! I started looking into this a little while ago, and it turned out to be much more difficult than anticipated. I'll have something to share soon. 🤞 |
+1 on adding debugger support. Great extension, btw. |
FB has mostly switched to using XDebug now (e.g. via Nuclide); I strongly recommend that any support be built on that instead of the hphpd protocol. |
Interesting, I'd love to see a working example of XDebug on HHVM. I've never been successful getting it to go. The hphp debugger always worked great and was fast to boot. |
I'm not familiar with it, but FWIW Nuclide's implementation is here: https://github.com/facebook/nuclide/tree/122fc05acb4441d9f2a95b822c583a2804165977/pkg/nuclide-debugger-php-rpc |
We're fairly likely to add vscode debug protocol support in the near future - related to #15 |
That's started: facebook/hhvm@89197d1...e54db18 |
Hey all, I wanted to share an update that will hopefully be useful to you: we are actually ditching XDebug support in HHVM and Nuclide and instead having HHVM speak the VS Code Debugger protocol directly. This should make it dramatically easier to integrate debugger support into this extension! The new code is already available in nightly builds, and can be found here: I haven't provided a wrapper yet to make this plug into VS Code but that's on my to-do list and I'll have one available soon. |
Nuclide's client-side implementation that speaks to this new debugger can be found here: The relevant files are hhvmDebugger.js and hhvmWrapper.js |
This is great to hear! I'd be happy to update the extension with debugging support, if you can help me get it working on the HHVM side. VSCode also has a helpful sample debugger client in node. |
Awesome, I haven't integrated this with VS Code yet but am planning on doing that soon (likely next week) so once I have a reference implementation I'll share it! |
BTW does this support both local script execution and attaching to/breaking remote server requests? |
It does from Nuclide! Currently, VS Code does not have a concept of remote projects so I am not quite sure yet how this should work for remote requests. The HHVM debugger is listening on a TCP port, which can be easily forwarded to wherever you are running VS Code via SSH tunneling, after that it would work just the same as if it were a local request. The remaining complexity is the source code though - you'd need matching copies locally and on the remote server since the VS Code client is going to set breakpoints in local documents, and the server needs to match them to the code that's actually executing. There are some efforts ongoing to add remote project support to VS Code, after that this would work more seamlessly |
@ebluestein I was able to get the debugger working with VS Code amazingly well, but found some inconsistencies with the protocol implementation at the HHVM side. Not sure if they are known to you or not, so I'll file issues for them on the HHVM repo. |
@PranayAgarwal : I'm expecting to release 3.25 on the 14th - if this is in a tagged release of the extension and you're confident in it, I'm happy to mention this extension in the release notes. |
@PranayAgarwal Thank you for those reports, it was extremely helpful! I think most of the issues are fixed in the release @fredemmott is referring to, please let me know if you encounter any more problems! |
Awesome! Assuming everything is in the latest nightly build, I'll make some more changes to the extension and get a release out in the next few days. |
It's in the latest nightly linux builds; facebook/hhvm@a2142c9 isn't in any mac builds yet. |
I use linux and docker builds for development, so should be good 👍 |
Hi, do you have any news about the release of debugger support? |
Hi @MrCalen , I'm making some final changes and validating, and will have a new version of the extension with debugger support out soon. |
Pushed out a new version of the extension with a somewhat functional debugger, so closing this issue. Please file any bugs or other problems you find. |
Would love to see VSCode's debugger work with HHVM. I'm willing to help but have no idea where to start.
I've tried getting xdebug debugging working in HHVM and failed, but I did have success with HHVM's built-in debugger--although it was a pain to use. Integrating that with VSCode would be a dream...
The text was updated successfully, but these errors were encountered: