question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use PHP Xdebug without sidecar?

See original GitHub issue

The development image we use for our workspace, already has PHP 7 and Xdebug installed on it.

How do we get this working with Che7/Theia so that the xdebug in the development container is able to communicate with the debugger in theia?

I can see there is a plugin for the felixfbecker/vscode-php-debug but this seems to start a new sidecar container without all the php modules we need (whereas these are already installed on the dev container).

I guess we need to be able to point our xdebug to the right internal host/port somehow?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
davidwindellcommented, Jan 18, 2020

@amisevsk this is fantastic, thank you. I can confirm that just by enabling the config below for xdebug in our dev container:

xdebug.remote_enable = 1
xdebug.remote_autostart = 1

it is able to communicate with Theia debugger.

I think I had misunderstood how the plugin sidecar worked because the first test I did was using a “Launch currently open script” launch command. This I believe launches the said script in the xdebug plugin sidecar (correct me if I’m wrong). Whereas the listen action works when the site is browsed via the dev container.

Thanks again!

0reactions
davidwindellcommented, Jan 28, 2020

Ah, and now I can see the .vsix reference in the docs https://www.eclipse.org/che/docs/che-7/using-a-visual-studio-code-extension-in-che. Cheers

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation » Step Debugging - Xdebug
Xdebug's step debugger allows you to interactively walk through your code to debug control flow and examine data structures.
Read more >
Debugging within a PHP Docker Container using IDEA ...
Install and Configure Xdebug in the PHP Docker Container ; FROM ; rm -rf /var/lib/apt/lists/* ; && docker-php-ext-enable xdebug ; 'zend_extension="/ ...
Read more >
PHP development with Docker the easy way | by Stefan Pöltl
Enable Xdebug with PHPStorm · Click Add configuration in the Toolbar · Click + and add PHP Remote Debug · Select filter debug...
Read more >
How to Use Xdebug for Advanced PHP Debugging
No one wants to start messing around on a live site, editing files to add logging lines. Don't worry, PhpStorm and Xdebug have...
Read more >
Learn How to Debug PHP with Xdebug and VsCode
After installation, you must reload the VSCode window. Now, again run phpinfo(); method in any PHP file to check if Xdebug is enabled...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found