Skip to content

Commit

Permalink
[App] Fix VSCode IDE debugger (#15747)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6714ca7)
  • Loading branch information
tchaton authored and Borda committed Nov 21, 2022
1 parent 8e22225 commit 6a4f221
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/lightning_app/CHANGELOG.md
Expand Up @@ -18,6 +18,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Fixed

- Fixed debugging with VSCode IDE ([#15747](https://github.com/Lightning-AI/lightning/pull/15747))


-


Expand Down
10 changes: 5 additions & 5 deletions src/lightning_app/core/app.py
Expand Up @@ -169,17 +169,17 @@ def __init__(

logger.debug(f"ENV: {os.environ}")

def _update_index_file(self):
# update index.html,
# this should happen once for all apps before the ui server starts running.
frontend.update_index_file(FRONTEND_DIR, info=self.info, root_path=self.root_path)

if _should_dispatch_app():
os.environ["LIGHTNING_DISPATCHED"] = "1"
from lightning_app.runners import MultiProcessRuntime

MultiProcessRuntime(self).dispatch()

def _update_index_file(self):
# update index.html,
# this should happen once for all apps before the ui server starts running.
frontend.update_index_file(FRONTEND_DIR, info=self.info, root_path=self.root_path)

def get_component_by_name(self, component_name: str):
"""Returns the instance corresponding to the given component name."""
from lightning_app.structures import Dict as LightningDict
Expand Down

0 comments on commit 6a4f221

Please sign in to comment.