Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.40.0]

- Add Listen for Xdebug to debug panel.

## [1.39.1]

- Fix copy formatting on empty array.
Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,9 @@
{
"command": "extension.php-debug.copyRaw",
"title": "Copy Value as raw"
},
{
"command": "extension.php-debug.listenForXdebug"
}
],
"keybindings": [
Expand All @@ -674,6 +677,13 @@
"key": "F11",
"when": "!inDebugMode && activeViewlet == 'workbench.view.debug' && debugConfigurationType == 'php'"
}
],
"viewsWelcome": [
{
"view": "debug",
"contents": "[Listen for Xdebug](command:extension.php-debug.listenForXdebug)",
"when": "debugStartLanguage == php"
}
]
}
}
11 changes: 11 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,17 @@ export function activate(context: vscode.ExtensionContext) {
})
)

context.subscriptions.push(
vscode.commands.registerCommand('extension.php-debug.listenForXdebug', async () => {
await vscode.debug.startDebugging(undefined, {
name: 'Listen for Xdebug',
type: 'php',
request: 'launch',
port: 9003,
})
})
)

/* This is coppied from vscode/src/vs/workbench/contrib/debug/browser/variablesView.ts */
interface IVariablesContext {
sessionId: string | undefined
Expand Down