wardenenv/warden

Support on Xdebug with Vscode in Ubuntu

KarthikMadathil opened this issue · 4 comments

Version of Warden

0.14.1

Operating System and Installation Method

Ubuntu 22.04.2 LTS

Image

Hei I want to use Xdebug with Vscode.

How will it be possible while using the warden?

I did the config mentioned in the document but still its not working as expected.

{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceRoot}"
}
}
]
}

Does anybody know how to use Xdebug with Vscode in Ubuntu?

Describe the Bug

How will it be possible to debug while using the warden in vs code on ubuntu

To Reproduce

  1. Go to 'Install Project '
  2. Add configuration on project root directory .vscode/launch.json'
  3. configurationFile Content
    {
    "version": "0.2.0",
    "configurations": [
    {
    "name": "Listen for XDebug",
    "type": "php",
    "request": "launch",
    "port": 9003,
    "pathMappings": {
    "/var/www/html": "${workspaceRoot}"
    }
    }
    ]
    }

Expected Behavior

No response

Additional context

No response

bap14 commented

@KarthikMadathil I just used your config in my vscode and it worked. The only extra thing you have to remember to do is to enable the debugging in the browser. I tested this using the CMS index controller (for a CMS page).

So it could be one of a few things:

  1. You forgot to enable the XDebug browser extension to send the XDebug request header(s)
  2. You're seeing a cached page and because of that your code isn't being hit
  3. Your code just isn't being hit because of some other issue (bad route, not being included on the page, etc.)

@bap14

You forgot to enable the XDebug browser extension to send the XDebug request header(s)

https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc
This is already installed

You're seeing a cached page and because of that your code isn't being hit

I just disabled all and tried again stil itsnt getting

Your code just isn't being hit because of some other issue (bad route, not being included on the page, etc.)

May be. I ve earlier installed php with apache, and MySQL manually like a dev environment and while using so I could use debug.But with warden isn't possible
The page is serving properly and changes are reflected but Dubugger isn't caching

Can you help me fixing this issue ?

for me is worked. Please review your configurations

Hey @KarthikMadathil ,
Can you check if your ufw is active or not by running:
sudo ufw status verbose
If it is active than try disabling it by running:
sudo ufw disable

It worked for me. Let me know if it works for you or not.