forked from platformio/platformio-core
Switch to project directory before starting debugging process
This commit is contained in:
@ -150,12 +150,15 @@ def cli(ctx, project_dir, project_conf, environment, verbose, interface, __unpro
|
||||
|
||||
loop = asyncio.ProactorEventLoop() if IS_WINDOWS else asyncio.get_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
with fs.cd(project_dir):
|
||||
client = GDBClientProcess(project_dir, debug_config)
|
||||
coro = client.run(__unprocessed)
|
||||
try:
|
||||
loop.run_until_complete(coro)
|
||||
if IS_WINDOWS:
|
||||
# an issue with asyncio executor and STIDIN, it cannot be closed gracefully
|
||||
# an issue with `asyncio` executor and STIDIN,
|
||||
# it cannot be closed gracefully
|
||||
proc.force_exit()
|
||||
finally:
|
||||
del client
|
||||
|
Reference in New Issue
Block a user