mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Switch to project directory before starting debugging process
This commit is contained in:
@ -150,15 +150,18 @@ def cli(ctx, project_dir, project_conf, environment, verbose, interface, __unpro
|
|||||||
|
|
||||||
loop = asyncio.ProactorEventLoop() if IS_WINDOWS else asyncio.get_event_loop()
|
loop = asyncio.ProactorEventLoop() if IS_WINDOWS else asyncio.get_event_loop()
|
||||||
asyncio.set_event_loop(loop)
|
asyncio.set_event_loop(loop)
|
||||||
client = GDBClientProcess(project_dir, debug_config)
|
|
||||||
coro = client.run(__unprocessed)
|
with fs.cd(project_dir):
|
||||||
try:
|
client = GDBClientProcess(project_dir, debug_config)
|
||||||
loop.run_until_complete(coro)
|
coro = client.run(__unprocessed)
|
||||||
if IS_WINDOWS:
|
try:
|
||||||
# an issue with asyncio executor and STIDIN, it cannot be closed gracefully
|
loop.run_until_complete(coro)
|
||||||
proc.force_exit()
|
if IS_WINDOWS:
|
||||||
finally:
|
# an issue with `asyncio` executor and STIDIN,
|
||||||
del client
|
# it cannot be closed gracefully
|
||||||
loop.close()
|
proc.force_exit()
|
||||||
|
finally:
|
||||||
|
del client
|
||||||
|
loop.close()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Reference in New Issue
Block a user