microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.64k stars 29.04k forks source link

Support PHP debug #706

Closed neatlife closed 8 years ago

ducke commented 8 years ago

https://visualstudio.uservoice.com/forums/293070-visual-studio-code

jrieken commented 8 years ago

Everyone is invited to write an extension for that.

egamma commented 8 years ago

Here is the documentation for how to do integrate a debugger into VS Code:

XDebug would be one option: http://xdebug.org/

herbertpimentel commented 8 years ago

a lot of people want it see https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7752606-php-intellisense

bubifengyun commented 8 years ago

good idea!

felixfbecker commented 8 years ago

I would write one, but the documentation isn't really helpful as it basically says "download the example project". A step-by-step tutorial would be helpful.

felixfbecker commented 8 years ago

Found https://github.com/cmpaul/vscode-php-debug

weinand commented 8 years ago

@felixfbecker https://code.visualstudio.com/docs/extensions/example-debuggers is meant to be a "a step-by-step tutorial". Please let me know what you are missing from the tutorial or what is difficult to understand. I'd be glad to help.

felixfbecker commented 8 years ago

@weinand There is a good documentation about the VS Code debugger protocol and a tutorial about how to get the mock debugger up and running. But the mock debugger itself (the classes in the common folder) are, besides inline comments, not documented at all. There's just all these methods that somehow get called and it's not clear to me when and what parameters are important.

I'm (and I think many others are) interested in Java and PHP debugging support. Thank you for your offer to help, maybe we can talk on the VS Code Gitter? https://gitter.im/Microsoft/vscode

weinand commented 8 years ago

@felixfbecker thanks for the feedback. I'll try to improve the class documentation next week. The classes in common are actually not that important because they are just an implementation detail of the server side framework. Debug adapter implementers are just expected to implement the 'xxxxRequest' methods of their subclass of DebugSession. I think it will help if I copy the high level documentation from https://code.visualstudio.com/docs/extensionAPI/api-debugging into the individual methods of the mock debugger and the DebugSession class.

felixfbecker commented 8 years ago

I have an extension that is 80% finished: https://www.github.com/felixfbecker/vscode-php-debug

felixfbecker commented 8 years ago

Here it is: https://marketplace.visualstudio.com/items/felixfbecker.php-debug :)

weinand commented 8 years ago

@felixfbecker Awesome - php-debug looks great!

And thanks a lot for your feedback. On January 4 we will resume work on the bugs and feature requests you've filed ;-)

bubifengyun commented 8 years ago

work not well. maybe I need test it in yii2

felixfbecker commented 8 years ago

@bubifengyun If the debug adapter is not working please open an issue at my repository.

bubifengyun commented 8 years ago

@felixfbecker OK, thanks for your great work. I will debug yii2 using vscode-phpdebug

felixfbecker commented 8 years ago

I feel that my extension is actually a pretty solid solution and as it is probably not planned to move this feature into core, maybe this issue should be closed?

egamma commented 8 years ago

Agreed with @felixfbecker this is well covered by the extension - closing