Skip to content

[XDebug Bridge] Exclude file and directory paths from devtools stack and debugging #2423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

mho22
Copy link
Collaborator

@mho22 mho22 commented Jul 25, 2025

Motivation for the change, related issues

Based on this comment and pull request.

In Playground CLI, the first line where Xdebug stops in Devtools is the auto_prepend_file.php located in the internal directory. This pull request aims to ignore what's in the directory by adding a excludedPaths option in the bridge that will be ignored when stacking or stepping.

Implementation details

TBD

Testing Instructions

With script cli.ts :

import { runCLI } from "./packages/playground/cli/src/run-cli";

const script = `<?php

$test = 42;

echo "Output!\n";

function test() {
	echo "Hello Xdebug World!\n";
}

test();
`;

const cliServer = await runCLI({command: 'server', xdebug: true, experimentalDevtools: true});

cliServer.playground.writeFile('xdebug.php', script);

const result = await cliServer.playground.run({scriptPath: `xdebug.php`});

console.log(result.text);

Run command :

node --no-warnings --experimental-wasm-stack-switching --experimental-wasm-jspi --loader=./packages/meta/src/node-es-module-loader/loader.mts cli.ts

Before

before

After

after

@mho22 mho22 changed the title [Xdebug Bridge] Exclude file and directory paths from devtools stack and debugging [XDebug Bridge] Exclude file and directory paths from devtools stack and debugging Jul 25, 2025
@mho22 mho22 mentioned this pull request Jul 25, 2025
12 tasks
@mho22
Copy link
Collaborator Author

mho22 commented Aug 4, 2025

I will need to add tests before making it ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant