-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Debug adapter protocol support #574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 120 commits
Commits
Show all changes
262 commits
Select commit
Hold shift + click to select a range
541f7a0
Add attach command
dsseng 9678df1
refactor server message handling
dsseng 59d6b92
refactor response processing
dsseng d6de540
dispatch events in client
dsseng c72475b
client: handle events multiple times
dsseng 09390be
dap-basic: handle output events
dsseng 0777948
dap-basic: better output formatting
dsseng b3be6b2
dap-basic: parse stop event
dsseng cc650c7
types: capitalize ID in names
dsseng c549278
compat: remove seq from Response and Event
dsseng 43c9eba
compat: remove missing caps
dsseng e388079
compat: add all possible debugger caps
dsseng d4c215b
compat: don't wait for launch and attach response
dsseng 809990a
format
dsseng eb0605c
dap: create C example
dsseng e7f543f
format
dsseng f5b1655
format
dsseng 2a62108
dap-lldb: adjust breakpoint position
dsseng 4f2b8fb
dap-dlv: rename from dap-go
dsseng ae32159
Revert "compat: don't wait for launch and attach response"
dsseng f92fb96
working lldb example
dsseng 36fb8d1
examples: make examples identical
dsseng 279db98
refactor: use tagged enum for handling DAP payloads
dsseng 6c0f7ea
examples: continue handling output events
dsseng b9797a7
client: support tcp_process transport
dsseng 3f62799
Get cargo check to pass in the subcrate
archseer 6225401
A request always needs to have a response, per spec (the body can be …
archseer 2d1ae2e
dap: Split types off into types.rs
archseer 3a9e1c3
Refactor types, add a Request trait
archseer 184abdc
dap: Significantly simplify code using the Request trait
archseer 8fbda0a
fix: Used the wrong type for variables
archseer 54dc2f8
Fix example compilation
archseer 0300dbd
Avoid cloning a request on send
archseer d39baa3
Start integrating into the editor's event loop
archseer 2094ff1
Silence TCP client messages on stdout, log them in the future
archseer 86102a6
wip
archseer 8759dc7
Add Default to some structs
archseer 94a1951
Work towards a breakpoint UI
archseer a54b09e
dap: Split out launch from init
archseer c4970c6
make CI green
dsseng e2c74d2
Add command to run debug target
dsseng 9e22842
move debug command to keybinding
dsseng 738e8a4
Unify init and launch commands
dsseng 6458ede
Add stack pointer display when stopped
dsseng 5f5b383
Fix clippy warnings
dsseng 56bddb1
Highlight line number of stack pointer
dsseng 7087558
Don't leave debugged programs running
dsseng 3fc501c
Correctly display 1-based breakpoints
dsseng a938f5a
refactor: handle DAP events in editor main loop
dsseng bcab93c
Update editor window when stopped
dsseng 5a06263
report status when target started or stopped
dsseng afeaba1
add rx dispatcher to examples
dsseng 462c8a6
Show debugger output in the statusline
dsseng 26dee49
Add command to detach debugger
dsseng 6709b42
Drop and terminate debugger
dsseng 66c035f
Continue command
dsseng 5230a2b
Continue command in keymap
dsseng f3e47bf
Disable continuing when running
dsseng 95ba4ff
Hide stack pointer when continued
dsseng cc66475
Add commands for variable introspection
dsseng 89ad54a
Add variable type to output
dsseng 91f2c60
Jump to stack pointer when stopped
dsseng a964cba
Extract handle_debugger_message, we should avoid bloating tokio::select!
archseer 7233ab2
Merge branch 'debug' of https://github.com/sh7dm/helix into debug
dsseng 2aee5f0
Style
dsseng 2865883
Add more event types, simplify event decoding
archseer dfc70a1
dap: support stepIn, stepOut, next and pause commands
dsseng d93cd2a
editor: support stepIn, stepOut, next and pause commands
dsseng be9dc58
editor: mark target as running when continued
dsseng 1321983
editor: go to pos where stack pointer is located
dsseng d0b0c9b
editor: select a range if stack pointer has an end
dsseng 74102bf
examples: fix build
dsseng 060a422
fix crash when pausing
dsseng 838f699
Simplify variables display
dsseng 3197c25
Add eval command
dsseng f247858
Support conditional breakpoints
dsseng 53ee57f
clippy
dsseng b78f70e
show breakpoint condition in diagnostics
dsseng dabec2d
Fix line endings
dsseng c5b210d
Add debug-adapter field to languages.toml
dsseng f55a012
editor: add debug session config
dsseng 839d210
Enable stdio transport via config
dsseng b6b99b2
config: minor fixes
dsseng 802ef20
chore: bump helix-dap version to 0.4.1
dsseng 56d00fa
Fix tests
dsseng e529f4e
add lldb debugger for C
dsseng b5b79e3
types: make some fields optional as in spec
dsseng 09c994a
editor: drop telemetry output messages
dsseng c09b151
fix freeze with lldb terminated event
dsseng b3469df
add lldb for c++
dsseng 3a5e044
languages: support debug for Rust with LLDB
dsseng ec599a1
Do not panic if entered unknown code via stack trace
dsseng 5d3c69d
Support logpoints
dsseng c4085b4
Use saturating_sub for lenght
dsseng fdad7d6
Check capabilities for breakpoint config
dsseng 2158366
Enable variable types in DAP config
dsseng 34c6094
refactor
dsseng c463142
Create new debugger config format
dsseng 774ab6f
Add new format configs for Rust and C/C++
dsseng 0e77938
Format
dsseng 1041a5b
Support launching configs by name
dsseng 31212e1
Rename functions
dsseng b001008
Support templates in debug configurations
dsseng 299da5a
Support attach request
dsseng 235a84d
Remove shortcut for starting debug
dsseng 8cc6d68
Autocomplete files for debug command
dsseng 2c3e2b9
Workaround for debugging Go tests
dsseng 326293c
only show variables' names and types
dsseng ba96f5d
Format Cargo.toml
dsseng 4ee66b8
Support remote debug adapter
dsseng c7759a5
Merge remote-tracking branch 'origin/master' into debug
dsseng 2ad2838
Fix tests
dsseng 3b87fce
Print errors occurred in debug commands
dsseng 890b51b
Paginated variables
dsseng 5e4da09
Don't let picker be too narrow
dsseng 8df6739
New way of starting debug sessions
dsseng e315394
Merge remote-tracking branch 'origin/master' into debug
dsseng ef155e6
Add filename autocomplete to template args
dsseng 94901b8
Customized completion for template parameters
dsseng af657ef
Fix lints
dsseng 2d42766
wip: refactor parameters in UI start
dsseng 9d2f2a9
Support multiple arguments for debug configs
dsseng 98fda6b
better completion
dsseng f53d841
Add extra annotations to completions
dsseng b426319
Defaults in completions, better schema
dsseng db7f693
More advanced completions
dsseng 2a7e38a
helix-core doesn't need to import serde_json
archseer ee2ba74
Rename dap_in/_out to dap_step_in/_out
archseer d6ccc15
Extract dap commands into a separate file
archseer 51328a4
dap: extract dap_pos_to_pos
archseer 81f51c1
dap: continued: THis check is already done before the match statement
archseer 4d24a43
dap: use smallvec! macro
archseer 03b2d81
dap: better yet, use Selection::single..
archseer 986828e
dap: Remap keys, match current thread behavior from dap-mode, switch-…
archseer 2c7b754
dap: refactor frame handling
archseer 0b0b1d8
dap: Stop comparing file paths per line number
archseer 6265e19
compat: change lldb to lldb-vscode
dsseng 5b20f60
Merge remote-tracking branch 'origin/master' into debug
dsseng e0180a4
find main thread automatically if thread stopped is not known
dsseng 2c89107
Fix crash when stack trace not loaded
dsseng 9c64650
force update of stack trace when stopped
dsseng 4c410ee
Merge remote-tracking branch 'origin/master' into debug
archseer 5b920c5
Refactor resume_application state handling
archseer 27c1b3f
dap: Extract a thread_states map
archseer 42f9718
dap: Extract thread_picker, make pause explicitly select a thread
archseer 289303a
dap: small TODO
archseer b997d2c
dap: Allow setting breakpoints before starting the adapter
archseer 7b61c63
Handle stderr
archseer c63ad60
dap: Allow switching between stack frames
archseer cf7237d
compat: make thread IDs signed
dsseng 9939dbf
Fix clippy warnings
dsseng 00cccdc
Don't show thread picker for single-threaded targets
dsseng 9a1916e
show thread states in thread picker
dsseng cb31d20
mark thread as running when resumed
dsseng c6186ce
jump to selected stack frame
dsseng 430c80f
Fix crash when trying to select (view) threads when debuggee is running
dsseng df0ea66
examples: ensure target stopped by waiting for enter from user
dsseng 698583c
Support setting breakpoints with mouse
dsseng e36fc57
refactor breakpoint edit
dsseng 1befbd0
Add command for editing breakpoint condition
dsseng 3b0ec75
Support editing breakpoint condition with right click
dsseng 7bdead5
Drop old commands
dsseng 8a60904
Mouse command for editing logpoint
dsseng 0e1e4ed
different display for conditional logpoints
dsseng bb26c58
Keybinding for editing log
dsseng b6c58ea
Support thread previews
dsseng 2d35b7b
Normalize line in picker preview to avoid crash
dsseng 0add0c5
Make conditional logpoints underlined
dsseng 9b8c5bd
Remove redundant fetching of stack traces
dsseng bdd636d
Clean up import
dsseng c9cd06e
Fetch stack traces for all threads when debugger sets all_thread_stop…
dsseng 507a1f8
Get breakpoint reports from debugger
dsseng 413e477
lldb: use stdio transport by default
dsseng bf53aff
Merge branch 'master' into debug
dsseng 0e51e5f
editor: support setExceptionBreakpoints
dsseng d943a51
editor: add Node.js debugger
dsseng 814dcfa
fix lints
dsseng 48cb81e
Merge branch 'master' into debug
dsseng bc0084d
fix command descriptions
dsseng 0a6b600
Merge branch 'master' into debug
archseer ea59f77
Port over parsing improvements from the LSP
archseer 83a8167
Invert core -> dap dependency
archseer bda05ec
Use a newtype for ThreadId
archseer d6e8a44
dap: Fix examples
archseer 6aa9838
dap: support arrays as arguments
dsseng cde57da
lldb: add gdbserver connection template
dsseng f979bdc
Specify capacity on toggle_line_comments
archseer f2b709a
Merge branch 'master' into debug
archseer 14a3502
dap: Move template selection into a picker
archseer 09d8c13
dap: Enable sticky mode for the submode
archseer a5ea614
dap: Bump helix-core
archseer 2e1aa5f
Fix compilation
archseer e2a23ac
If there is no live debugger, treat breakpoints as unverified
archseer 64bb1f7
dap: Extract out variable rendering
archseer 3b8d510
Make picker take the whole context, not just editor
archseer 5938ab1
dap: Fully extract template parameter prompts
archseer fd9b826
dap: Inline empty completer
archseer 9baddc8
dap: Get rid of excessive cloning
archseer 155c608
dap: Drop examples
archseer 5803de2
dap: Simplify more calls
archseer 757babb
dap: Avoid cloning *entire* stack frames when picking a thread
archseer 9dd17c4
dap: Avoid cloning old_breakpoints if we are immediately replacing them
archseer 31b431b
dap: Remove Deref for DebuggerCapabilities
archseer 2bd8a9b
dap: Consistently rename type as ty
archseer 4f2a01c
dap: Error implements Display so we can format with {}
archseer 6586808
dap: Simplify launch & start
archseer 9963a56
dap: Minor simplifications
archseer 3042ff3
dap: Clean up dap_start_impl, no need to clone arg keys
archseer c39d9f4
dap: Simplify debug_parameter_prompt
archseer 09f5796
dap: Simplify get_breakpoint_at_current_line
archseer 8b85903
wip
archseer d1854d8
Merge remote-tracking branch 'origin/master' into debug
archseer 05d3ad4
dap: Remove an excess clone on enable_exceptions
archseer 3b3c396
nix: Update to lld 13, drop flake-compat (was unused)
archseer 5f329a2
dap: Modify breakpoints in place with no cloning
archseer 0eadeab
dap: Remove the prompt line parameter, use insert_str instead
archseer b55ca8f
dap: Always edit breakpoints on the correct document
archseer 28fd704
ui: Since diagnostics are sorted, we can use binary search
archseer 177b6fc
cargo fmt
archseer 85b4410
dap: Toggle breakpoints without changing selection, fix offset calc
archseer 7257682
dap: Replace breakpoint when changed event comes through
archseer 9ed930b
Merge remote-tracking branch 'origin/master' into debug
archseer 3633f85
Pass editor into render_view & gutter, reducing the number of params
archseer 8ffafb8
dap: Rewrite breakpoints so that there's a single set maintained
archseer 30ac586
dap: Extract diagnostics gutter into gutters.rs
archseer d906911
dap: Prevent crashes on files with no name or breakpoints
archseer 84e939e
Provide a single gutter component that does breakpoint || diagnostic
archseer 96ae589
Remove another parameter from render_view
archseer b4fd314
These TODOs have been resolved
archseer dfd499f
dap: Highlight line of current stack frame
archseer ffc89e4
Mark some more TODOs as resolved
archseer 573cb39
dap: Remove some unwraps
archseer 54f8e5c
dap: Fix an off-by-one and move the function over to commands/dap
archseer de5e586
dap: Use cursor_line over cursor + char_to_line
archseer d14ca05
Simplify some cases that use return None to use ?
archseer 0d73a4d
dap: console = internalConsole is actually not a lldb-vscode param
archseer 2dbf966
dap: Start working on runInTerminal support
archseer 032aaff
dap: Split call/request in the same way LSP does
archseer 43fbb6d
Make dap_start non-blocking
archseer bcf70d8
dap: All of these calls don't need &mut
archseer 5545f8e
dap: Add RunInTerminal reverse request, support replying to requests
archseer d5d1a9b
Apply suggestions from code review
archseer 2b4de41
dap: Reply to RunInTerminal
archseer dc8df7b
Make thread_picker non-blocking
archseer bf8437d
clippy lint
archseer e98993d
dap: Fix an off-by-one error when jumping
archseer d8351d3
dap: Extract a macro that fetches a debugger or returns
archseer 60c86ef
dap: Simplify a few more statements that could use the debugger macro
archseer dac317e
TODO
archseer df3b883
dap: Improve variables UI
archseer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[package] | ||
name = "helix-dap" | ||
version = "0.4.1" | ||
authors = ["Blaž Hrastnik <[email protected]>"] | ||
edition = "2018" | ||
license = "MPL-2.0" | ||
description = "DAP client implementation for Helix project" | ||
categories = ["editor"] | ||
repository = "https://github.com/helix-editor/helix" | ||
homepage = "https://helix-editor.com" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
anyhow = "1.0" | ||
log = "0.4" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0" | ||
thiserror = "1.0" | ||
tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "net", "sync"] } | ||
|
||
[dev-dependencies] | ||
fern = "0.6" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
use helix_dap::{events, Client, Event, Payload, Result, SourceBreakpoint}; | ||
archseer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
use serde::{Deserialize, Serialize}; | ||
use serde_json::to_value; | ||
use tokio::sync::mpsc::UnboundedReceiver; | ||
|
||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] | ||
#[serde(rename_all = "camelCase")] | ||
struct LaunchArguments { | ||
mode: String, | ||
program: String, | ||
} | ||
|
||
async fn dispatch(mut rx: UnboundedReceiver<Payload>) { | ||
loop { | ||
match rx.recv().await.unwrap() { | ||
Payload::Event(Event::Output(events::Output { | ||
category, output, .. | ||
})) => { | ||
println!( | ||
"> [{}] {}", | ||
category.unwrap_or("unknown".to_owned()), | ||
output | ||
); | ||
} | ||
Payload::Event(Event::Stopped(_)) => { | ||
println!("stopped"); | ||
} | ||
_ => {} | ||
}; | ||
} | ||
} | ||
|
||
#[tokio::main] | ||
pub async fn main() -> Result<()> { | ||
let base_config = fern::Dispatch::new().level(log::LevelFilter::Info); | ||
|
||
let stderr_config = fern::Dispatch::new() | ||
.format(|out, message, record| out.finish(format_args!("[{}] {}", record.level(), message))) | ||
.chain(std::io::stderr()); | ||
|
||
base_config | ||
.chain(stderr_config) | ||
.apply() | ||
.expect("Failed to set up logging"); | ||
|
||
let (mut client, events) = | ||
Client::tcp_process("dlv", vec!["dap"], "-l 127.0.0.1:{}", 0).await?; | ||
println!("create: {:?}", client); | ||
|
||
tokio::spawn(dispatch(events)); | ||
|
||
println!("init: {:?}", client.initialize("go".to_owned()).await); | ||
println!("caps: {:?}", client.capabilities()); | ||
|
||
let args = LaunchArguments { | ||
mode: "exec".to_owned(), | ||
program: "/tmp/godebug/main".to_owned(), | ||
}; | ||
|
||
println!("launch: {:?}", client.launch(to_value(args)?).await); | ||
|
||
println!( | ||
"breakpoints: {:#?}", | ||
client | ||
.set_breakpoints( | ||
"/tmp/godebug/main.go".into(), | ||
vec![SourceBreakpoint { | ||
line: 8, | ||
column: Some(2), | ||
condition: None, | ||
hit_condition: None, | ||
log_message: None, | ||
}] | ||
) | ||
.await | ||
); | ||
|
||
let mut _in = String::new(); | ||
std::io::stdin() | ||
.read_line(&mut _in) | ||
.expect("Failed to read line"); | ||
|
||
println!("configurationDone: {:?}", client.configuration_done().await); | ||
|
||
let threads = client.threads().await?; | ||
println!("threads: {:#?}", threads); | ||
let bt = client | ||
.stack_trace(threads[0].id) | ||
.await | ||
.expect("expected stack trace"); | ||
println!("stack trace: {:#?}", bt); | ||
let scopes = client | ||
.scopes(bt.0[0].id) | ||
.await | ||
.expect("expected scopes for thread"); | ||
println!("scopes: {:#?}", scopes); | ||
println!( | ||
"vars: {:#?}", | ||
client.variables(scopes[1].variables_reference).await | ||
); | ||
|
||
let mut _in = String::new(); | ||
std::io::stdin() | ||
.read_line(&mut _in) | ||
.expect("Failed to read line"); | ||
|
||
println!("continued: {:?}", client.continue_thread(0).await); | ||
|
||
let mut _in = String::new(); | ||
std::io::stdin() | ||
.read_line(&mut _in) | ||
.expect("Failed to read line"); | ||
|
||
println!("disconnect: {:?}", client.disconnect().await); | ||
|
||
Ok(()) | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
use helix_dap::{events, Client, Event, Payload, Result, SourceBreakpoint}; | ||
use serde::{Deserialize, Serialize}; | ||
use serde_json::to_value; | ||
use tokio::sync::mpsc::UnboundedReceiver; | ||
|
||
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] | ||
#[serde(rename_all = "camelCase")] | ||
struct LaunchArguments { | ||
program: String, | ||
console: String, | ||
} | ||
|
||
async fn dispatch(mut rx: UnboundedReceiver<Payload>) { | ||
loop { | ||
match rx.recv().await.unwrap() { | ||
Payload::Event(Event::Output(events::Output { | ||
category, output, .. | ||
})) => { | ||
println!( | ||
"> [{}] {}", | ||
category.unwrap_or("unknown".to_owned()), | ||
output | ||
); | ||
} | ||
Payload::Event(Event::Stopped(_)) => { | ||
println!("stopped"); | ||
} | ||
_ => {} | ||
}; | ||
} | ||
} | ||
|
||
#[tokio::main] | ||
pub async fn main() -> Result<()> { | ||
let base_config = fern::Dispatch::new().level(log::LevelFilter::Info); | ||
|
||
let stderr_config = fern::Dispatch::new() | ||
.format(|out, message, record| out.finish(format_args!("[{}] {}", record.level(), message))) | ||
.chain(std::io::stderr()); | ||
|
||
base_config | ||
.chain(stderr_config) | ||
.apply() | ||
.expect("Failed to set up logging"); | ||
|
||
let (mut client, events) = Client::tcp_process("lldb-vscode", vec![], "-p {}", 0).await?; | ||
println!("create: {:?}", client); | ||
|
||
tokio::spawn(dispatch(events)); | ||
|
||
println!("init: {:?}", client.initialize("lldb".to_owned()).await); | ||
println!("caps: {:?}", client.capabilities()); | ||
|
||
let args = LaunchArguments { | ||
program: "/tmp/cdebug/main".to_owned(), | ||
console: "internalConsole".to_owned(), | ||
}; | ||
|
||
println!("launch: {:?}", client.launch(to_value(args)?).await); | ||
|
||
println!( | ||
"breakpoints: {:#?}", | ||
client | ||
.set_breakpoints( | ||
"/tmp/cdebug/main.c".into(), | ||
vec![SourceBreakpoint { | ||
line: 6, | ||
column: Some(2), | ||
condition: None, | ||
hit_condition: None, | ||
log_message: None, | ||
}] | ||
) | ||
.await | ||
); | ||
|
||
let mut _in = String::new(); | ||
std::io::stdin() | ||
.read_line(&mut _in) | ||
.expect("Failed to read line"); | ||
|
||
println!("configurationDone: {:?}", client.configuration_done().await); | ||
|
||
let threads = client.threads().await?; | ||
println!("threads: {:#?}", threads); | ||
let bt = client | ||
.stack_trace(threads[0].id) | ||
.await | ||
.expect("expected stack trace"); | ||
println!("stack trace: {:#?}", bt); | ||
let scopes = client | ||
.scopes(bt.0[0].id) | ||
.await | ||
.expect("expected scopes for thread"); | ||
println!("scopes: {:#?}", scopes); | ||
println!( | ||
"vars: {:#?}", | ||
client.variables(scopes[0].variables_reference).await | ||
); | ||
|
||
let mut _in = String::new(); | ||
std::io::stdin() | ||
.read_line(&mut _in) | ||
.expect("Failed to read line"); | ||
|
||
println!("continued: {:?}", client.continue_thread(0).await); | ||
|
||
let mut _in = String::new(); | ||
std::io::stdin() | ||
.read_line(&mut _in) | ||
.expect("Failed to read line"); | ||
|
||
println!("disconnect: {:?}", client.disconnect().await); | ||
|
||
Ok(()) | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.