Skip to content

Commit bdb96bc

Browse files
committed
Fix: Always generate xdebug ini file to persist custom settings
When xdebug mode defaults to 'off', custom settings like client_port, start_with_request, and idekey were not being persisted to the ini file. This caused settings to be lost when toggling xdebug on later. Now the yyy-lando-xdebug.ini file is always created with all settings, regardless of mode, ensuring custom configuration persists through xdebug toggles.
1 parent aa08622 commit bdb96bc

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

builders/php.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,10 @@ const phpBuilder = {
285285

286286
options._xdebugConfig = normalizeXdebugConfig(options.xdebug);
287287
options.xdebug = options._xdebugConfig.mode;
288-
if (options._xdebugConfig.mode !== 'off') {
289-
const xdebugFile = path.join(options.confDest, options.defaultFiles.xdebug);
290-
fs.mkdirSync(options.confDest, {recursive: true});
291-
fs.writeFileSync(xdebugFile, generateXdebugIni(options._xdebugConfig));
292-
options.volumes.push(`${xdebugFile}:${options.remoteFiles.xdebug}`);
293-
}
288+
const xdebugFile = path.join(options.confDest, options.defaultFiles.xdebug);
289+
fs.mkdirSync(options.confDest, {recursive: true});
290+
fs.writeFileSync(xdebugFile, generateXdebugIni(options._xdebugConfig));
291+
options.volumes.push(`${xdebugFile}:${options.remoteFiles.xdebug}`);
294292

295293
options._app.config.tooling = options._app.config.tooling || {};
296294
if (_.get(options, '_app.config.tooling.xdebug') === undefined) {

0 commit comments

Comments
 (0)