-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
Support no folder debugging #638
Comments
Hi @isidorn ! Great to hear from you, thanks for reaching out. I'll have a more in depth look at what you are suggesting here, but I already think there should be no problem providing this. There are a few specifics how PHP debugging works, so I might need to take these into account. One is "listen for connection" the other is "listen and run". Short meeting sounds great, I'd love to hear what's coming next. I'll try to put together any issues I had with VSC/DAP recently to see if there is anything that is already being addressed. Let me know how we can schedule, but I would prefer early next week so I have time to prepare. Thanks! |
@zobo yes some time next week would be great. I just sent you an email, so we work out the timing. |
As we discussed in the meeting, here are some of the cool features that php-debug could adopt. @weinand and @roblourens please jump in with ideas. No folder debugging as mentioned aboveEasiest to do this is to have a dynamic Contribute to debug startThis should have commands that help user setup and start debugging. Example and more details in this issue microsoft/vscode-cpptools/issues/4837Contribute to inline value providersShould allow to have yellow inline values on the side while debugging More details in this issue microsoft/vscode/issues/105690Contribute the play button in editor title areaExample https://github.com/microsoft/vscode-java-debug/blob/main/package.json#L186
Feel free to ping us for any questions you might have. And thank you very much for improving php debugging 👏 👏 |
Thanks for all the examples and suggestions. I did a basic implementation for no folder in #645 and will try to further extend it with editor menu contribution. I will have a look at the other suggestions. I think the "contribute to debug start" is very interesting. Having the extension guide the user through setup would be invaluable. I think this would need to include:
|
@zobo sounds good. The extension could guide the user through a series of quick picks (if user interaction is needed). Maybe related to this: if there are different |
What if I simply have configured association? (Windows) |
Hi. Yes, I do agree that on windows (my primary platform also) people tend to avoid putting everything into PATH. However looking up executables for specific filename extensions feels... wrong. I feel providing a VS Code settings variable is the right way to go, in case we can't find php.exe in the PATH. @isidorn I believe VS Code already uses I'd use this logic for the no-folder debugging and also extend it to when a launch configuration is provided, but not Thanks! |
Already exists. |
This sounds reasonable to me. |
Hi @isidorn . I added
e9e4b85#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R432 Any hint on what is better and why? Also, would it make sense to show the Thanks! |
@zobo sorry for the slow response. I would always show it in Thanks for working on this 👏 |
@zobo I'm now back from vacation... You've asked:
No, the editor's run/debug menu is independent ("orthogonal") to the launch.json. This makes it possible to run or debug the editor contents without being affected by anything configured in the launch.json. I've noticed that you are using the You must implement and register your own Please see how this is done in Mock Debug: https://github.com/microsoft/vscode-mock-debug/blob/6a3df6d2e8bed44408f137d61053b8a8c020523f/src/activateMockDebug.ts#L15-L45 |
Hi Andre. Thanks for your input, I was already leaning into this direction as I saw java implemented it like this - I just didn't get around changing it yet. Since I have you both here, there is another situation I wanted to ask about: So what I'm asking is, what would be the best way to use VS Code as a standalone/no-folder/no-files tool? All this can be configured with Does this sound familiar to anything somebody else is doing? Thanks! |
@zobo what you call "read only" mode, sounds similar to VS Code's "JavaScript Debug terminal". When running a node.js program in the JavaScript Debug terminal, a debug session will be automatically created as soon as the node.js runtime tries to connect to a specific debug port. In order to make the node.js runtime issue a connect request to the debug port, the "JavaScript Debug terminal" just sets a specific environment variable that the node.js runtime picks up. Since the debug session is initiated by the runtime or debuggee (instead of the user), I would call this mode "reverse mode" (instead of "read only" mode). you said:
Yes, it makes perfect sense to enter this mode not by running a launch config. In the JavaScript case from above, starting the "JavaScript Debug terminal" enters this mode for all programs that are launched from that terminal. I'm not sure whether it would make sense to use the same approach for "php" because I don't think that "php" is typically launched from the command line. So maybe your "button" is a better way to control the "reverse mode". Js-debug uses a button in the status bar for controlling the "auto attach" mode. Since the statusbar is always visible this would be a preferable location for a "mode" button. @connor4312 since you know much more about this "reverse mode", I suggest that you chime in for additional ideas and suggestions. |
Yes, I did think about Debug Welcome View and will definitely try that, but I think that is only available when there is no lunch config. |
I have added a special command Line 435 in 462fe24
vscode-php-debug/src/extension.ts Line 63 in 462fe24
|
@zobo yes, the contributed "php.debug.debugPhpFile" command will only be visible if the editor's contents is of language type "php" |
Correct, but until I added the condition on the |
In Java extension, we use If php doesn't have similar requirement, |
Awesome 👏 Thanks for doing this 🎉 |
Now we just need to wait for GitHub Actions to come back up, so a release can be made available :) |
Hi VS Code PM here 👋
F5
-> notice how we offer the user to download your extension 👏F5
again and wants to debug, but nothing happens since php-debug is not supporting single folder debuggingEasiest to do this is to have a dynamic
resolveDebugConfiguartion
that will provide a launch configuration on the fly. ExampleApart from that consider contributing to the Editor title area menu, such that a Play button would appear in the Editor Title area (picture below). Example how to do this https://github.com/microsoft/vscode-mock-debug/blob/main/package.json#L80
I think both of these are super important and would really love that we improve this experience 💯
Let me know if I can help somehow. I am also open to a quick 30 min meeting where we can discuss about the new cool VS Code debug features that php-debug could potentially adopt.
fyi @weinand
The text was updated successfully, but these errors were encountered: