Skip to content

Commit

Permalink
Missing ConsoleSessionBound and examples.projects
Browse files Browse the repository at this point in the history
  • Loading branch information
daveleroy committed Feb 5, 2024
1 parent 44bd0ae commit e494b71
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
15 changes: 15 additions & 0 deletions examples/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
projects = [
"examples/sublime_debug/sublime.sublime-project",
"examples/cpp/cpp.sublime-project",
"examples/go/go.sublime-project",
"examples/mock/mock.sublime-project",
"examples/php/php.sublime-project",
"examples/python/python.sublime-project",
"examples/ruby/ruby.sublime-project",
"examples/web/web.sublime-project",
"examples/elixir/elixir.sublime-project",
"examples/lua/lua.sublime-project",
"examples/java/java.sublime-project",
"examples/scala/scala.sublime-project",
"examples/emulicious_debugger/emulicious-debugger.sublime-project",
]
3 changes: 1 addition & 2 deletions modules/dap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,5 @@
StdioTransport,
SocketTransport,

TransportStderrOutputLog,
TransportStdoutOutputLog,
TransportOutputLog,
)
16 changes: 15 additions & 1 deletion modules/dap/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,18 @@ def error(self, text: str, source: SourceLocation|None = None):
def info(self, text: str, source: SourceLocation|None = None):
self.log('comment', text, source)

def log(self, type: str, value: Any, source: SourceLocation|None = None): ...
def log(self, type: str, value: Any, source: SourceLocation|None = None, session: Session|None = None): ...

class ConsoleSessionBound(core.Logger):
def __init__(self, session: Session, console: Console) -> None:
self.session = session
self.console = console

def error(self, text: str, source: SourceLocation|None = None):
self.log('error', text, source)

def info(self, text: str, source: SourceLocation|None = None):
self.log('comment', text, source)

def log(self, type: str, value: Any, source: SourceLocation|None = None):
self.console.log(type, value, source=source, session=self.session)

0 comments on commit e494b71

Please sign in to comment.