File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/php-wasm/xdebug-bridge/src/lib Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,19 @@ export class XdebugCDPBridge {
301301 break ;
302302 case 'Debugger.setBreakpointByUrl' : {
303303 const { url : cdpUri , lineNumber : line } = params ;
304+ /**
305+ * `url` is an optional parameter. If it's not set, we don't
306+ * have enough information to set a breakpoint so let's just
307+ * ignore the message.
308+ *
309+ * Why would `url` be not set? We don't know that yet.
310+ *
311+ * https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#method-setBreakpointByUrl
312+ */
313+ if ( ! cdpUri ) {
314+ sendResponse = false ;
315+ break ;
316+ }
304317 const bridgeUri = this . uriFromCDPToBridge ( cdpUri ) ;
305318 const dbgpUri = this . uriFromBridgeToDBGP ( bridgeUri ) ;
306319 const lineNumber = ( typeof line === 'number' ? line : 0 ) + 1 ; // CDP lineNumber is 0-based, Xdebug expects 1-based
You can’t perform that action at this time.
0 commit comments