Skip to content

Aspire debug inconsistency- current working directory #16575

@tjwald

Description

@tjwald

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When running without a debugger the current working directory of a python app is set to the location of the app, but when running in vscode with a debugger it is updated to the location of the apphost .

This breaks legacy cods that we have that assumes that the working directory is the app's directory.

I tried setting it using WithCurrentWorking directory - the dashboard shows the correct working directory but the actual working directory is still the apphost.

My assumption is that the generated vscode debug profile is being set to the wrong current working directory and that isn't showing up in the dashboard.

Expected Behavior

Use the current working directory of the app as without the debugger.

Steps To Reproduce

Create an apphost with a python app.
In the app do:

import os
print(os.getcwd())

Run outside of vscode and with the debugger in vscode.

Exceptions (if any)

No response

Aspire doctor output

No response

Anything else?

I am running the daily build of aspire, but this should happen in the stable version. Haven't tested yet.

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions