Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Linux Tipps & HardeningRufus clone for Linux(29.09.2026 um 00:49 Uhr)
•
Windows Tipps & SecurityWhat distro should I use blah blah blah(29.09.2026 um 01:57 Uhr)
•
Sichere ProgrammierungJulian Goldie SEO: This Tiny AI Model Makes 28 Decisions a Second(29.09.2026 um 03:00 Uhr)
•
IT Security Toolsphantom-grid(29.09.2026 um 02:40 Uhr)
•
IT Security NachrichtenFBI-Datenleck: ShinyHunters soll PII von Tausenden gestohlen haben(29.09.2026 um 03:30 Uhr)
••
IT Security NachrichtenRSA-Sicherheit schwächer als gedacht:Forscher zeigen neuen Angriff(25.09.2026 um 10:38 Uhr)
•••
IT Security DownloadsGitHub Release: ollama/ollama v0.35.0 (28.09.2026)(28.09.2026 um 22:31 Uhr)
•
Linux Tipps & HardeningRufus clone for Linux(29.09.2026 um 00:49 Uhr)
•
Windows Tipps & SecurityWhat distro should I use blah blah blah(29.09.2026 um 01:57 Uhr)
•
Sichere ProgrammierungJulian Goldie SEO: This Tiny AI Model Makes 28 Decisions a Second(29.09.2026 um 03:00 Uhr)
•
IT Security Toolsphantom-grid(29.09.2026 um 02:40 Uhr)
•
IT Security NachrichtenFBI-Datenleck: ShinyHunters soll PII von Tausenden gestohlen haben(29.09.2026 um 03:30 Uhr)
••
IT Security NachrichtenRSA-Sicherheit schwächer als gedacht:Forscher zeigen neuen Angriff(25.09.2026 um 10:38 Uhr)
•••
IT Security DownloadsGitHub Release: ollama/ollama v0.35.0 (28.09.2026)(28.09.2026 um 22:31 Uhr)
•
Intelligence View
⚡ tsecurity.de Intelligence

How to Set Up PHP Xdebug on VS Code

If you want to debug your PHP code in VS Code, Xdebug is the best tool. This guide will help you set it up on Ubuntu in a few minutes. Step 1: Check Your PHP Version Open a terminal and run: php -v Example…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

If you want to debug your PHP code in VS Code, Xdebug is the best tool. This guide will help you set it up on Ubuntu in a few minutes.






Step 1: Check Your PHP Version



Open a terminal and run:




php -v






Example output:




PHP 8.2.12 (cli)






Remember your PHP version.






Step 2: Install Xdebug



Install Xdebug using:




sudo apt update
sudo apt install php-xdebug






Or install the version-specific package if needed:




sudo apt install php8.2-xdebug






Check that it is installed:




php -m | grep xdebug






If you see xdebug, it is installed successfully.






Step 3: Configure Xdebug



Open the Xdebug configuration file:




sudo nano /etc/php/<your-php-version>/mods-available/xdebug.ini






Replace <your-php-version> with your PHP version (for example, 8.2).



Add these settings:




zend_extension=xdebug.so

xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.client_host=127.0.0.1
xdebug.client_port=9003






Save the file.






Step 4: Restart PHP



If you use Apache:




sudo systemctl restart apache2






If you use PHP-FPM:




sudo systemctl restart php<your-php-version>-fpm









Step 5: Install the VS Code Extension



In VS Code:




  1. Open Extensions.

  2. Search for PHP Debug.

  3. Install the extension by Xdebug.






Step 6: Create launch.json



Create a .vscode/launch.json file with this content:




{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003
}
]
}









Step 7: Start Debugging




  1. Open your PHP project in VS Code.

  2. Add a breakpoint.

  3. Press F5 to start listening.

  4. Run your PHP script or open your website.



VS Code will stop at your breakpoint.






Check That Xdebug Is Working



Run:




php -v






If you see something like with Xdebug v3.x.x, everything is ready.






Conclusion



That's it! You have successfully set up PHP Xdebug on Ubuntu with VS Code. You can now debug your PHP applications more easily and find issues faster.

2. Cyber Threat Intelligence & Forensik

CTI Threat Relationship Graph2 Knoten / 1 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to Set Up PHP Xdebug on VS Code

Thematisch verwandte Begriffe: Xdebug, Code · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-101916 | @grpc/grpc-js implements the core functionality of gRPC purely in JavaS…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag