From f0ac16dafe3104ab3b8ac97f07e5347075f197c3 Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Tue, 12 Nov 2024 15:14:47 +0700 Subject: [PATCH 01/11] WIP: Replace result with custom enum --- crates/fuel-core/src/service.rs | 3 +- .../consensus_module/poa/src/service.rs | 45 ++++++++----- .../services/consensus_module/poa/src/sync.rs | 6 +- .../gas_price_service/src/v0/service.rs | 25 +++++--- .../gas_price_service/src/v0/tests.rs | 4 +- .../src/v1/da_source_service/service.rs | 19 +++--- crates/services/p2p/src/service.rs | 29 ++++++--- crates/services/relayer/src/service.rs | 11 ++-- crates/services/src/lib.rs | 1 + crates/services/src/service.rs | 63 ++++++++++++++----- crates/services/sync/src/service.rs | 12 ++-- crates/services/txpool_v2/src/service.rs | 31 ++++----- 12 files changed, 160 insertions(+), 89 deletions(-) diff --git a/crates/fuel-core/src/service.rs b/crates/fuel-core/src/service.rs index 6b42dd3960c..ca7f362a2a7 100644 --- a/crates/fuel-core/src/service.rs +++ b/crates/fuel-core/src/service.rs @@ -27,6 +27,7 @@ use fuel_core_services::{ ServiceRunner, State, StateWatcher, + TaskRunResult, }; use fuel_core_storage::{ not_found, @@ -428,7 +429,7 @@ impl RunnableService for Task { #[async_trait::async_trait] impl RunnableTask for Task { #[tracing::instrument(skip_all)] - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { let mut stop_signals = vec![]; for service in self.services.iter() { stop_signals.push(service.await_stop()) diff --git a/crates/services/consensus_module/poa/src/service.rs b/crates/services/consensus_module/poa/src/service.rs index ffb88f8db2a..bc5c0d1c761 100644 --- a/crates/services/consensus_module/poa/src/service.rs +++ b/crates/services/consensus_module/poa/src/service.rs @@ -42,6 +42,7 @@ use fuel_core_services::{ Service as OtherService, ServiceRunner, StateWatcher, + TaskRunResult, }; use fuel_core_storage::transactional::Changes; use fuel_core_types::{ @@ -518,7 +519,7 @@ where PB: PredefinedBlocks, C: GetTime, { - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { let should_continue; let mut sync_state = self.sync_task_handle.shared.clone(); // make sure we're synced first @@ -526,8 +527,7 @@ where tokio::select! { biased; result = watcher.while_started() => { - should_continue = result?.started(); - return Ok(should_continue); + return result.map(|state| state.started()).into() } _ = sync_state.changed() => {} } @@ -538,20 +538,31 @@ where } let next_height = self.next_height(); - let maybe_block = self.predefined_blocks.get_block(&next_height)?; + let maybe_block = match self.predefined_blocks.get_block(&next_height) { + Ok(option) => option, + Err(err) => return TaskRunResult::ErrorContinue(err), + }; if let Some(block) = maybe_block { - self.produce_predefined_block(&block).await?; - should_continue = true; - return Ok(should_continue) + let res = self.produce_predefined_block(&block).await; + return match res { + Ok(()) => TaskRunResult::Continue, + Err(err) => TaskRunResult::ErrorContinue(err), + } } let next_block_production: BoxFuture<()> = match self.trigger { Trigger::Never | Trigger::Instant => Box::pin(core::future::pending()), - Trigger::Interval { block_time } => Box::pin(sleep_until( - self.last_block_created + Trigger::Interval { block_time } => { + let next_block_time = match self + .last_block_created .checked_add(block_time) - .ok_or(anyhow!("Time exceeds system limits"))?, - )), + .ok_or(anyhow!("Time exceeds system limits")) + { + Ok(time) => time, + Err(err) => return TaskRunResult::ErrorContinue(err), + }; + Box::pin(sleep_until(next_block_time)) + } }; tokio::select! { @@ -579,17 +590,21 @@ where Err(err) => { // Wait some time in case of error to avoid spamming retry block production tokio::time::sleep(Duration::from_secs(1)).await; - return Err(err); + return TaskRunResult::ErrorContinue(err); } }; } _ = self.new_txs_watcher.changed() => { - self.on_txpool_event().await.context("While processing txpool event")?; - should_continue = true; + match self.on_txpool_event().await.context("While processing txpool event") { + Ok(()) => should_continue = true, + Err(err) => { + return TaskRunResult::ErrorContinue(err); + } + }; } } - Ok(should_continue) + TaskRunResult::should_continue(should_continue) } async fn shutdown(self) -> anyhow::Result<()> { diff --git a/crates/services/consensus_module/poa/src/sync.rs b/crates/services/consensus_module/poa/src/sync.rs index 4331ba3040f..62f155b5eff 100644 --- a/crates/services/consensus_module/poa/src/sync.rs +++ b/crates/services/consensus_module/poa/src/sync.rs @@ -11,6 +11,7 @@ use fuel_core_services::{ RunnableService, RunnableTask, StateWatcher, + TaskRunResult, }; use fuel_core_types::{ blockchain::header::BlockHeader, @@ -137,8 +138,7 @@ impl RunnableService for SyncTask { #[async_trait::async_trait] impl RunnableTask for SyncTask { - #[tracing::instrument(level = "debug", skip_all, err, ret)] - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { let mut should_continue = true; let tick: BoxFuture = if let Some(timer) = &mut self.timer { @@ -218,7 +218,7 @@ impl RunnableTask for SyncTask { } } - Ok(should_continue) + TaskRunResult::should_continue(should_continue) } async fn shutdown(self) -> anyhow::Result<()> { diff --git a/crates/services/gas_price_service/src/v0/service.rs b/crates/services/gas_price_service/src/v0/service.rs index ee062097dfd..2987b1d2a24 100644 --- a/crates/services/gas_price_service/src/v0/service.rs +++ b/crates/services/gas_price_service/src/v0/service.rs @@ -12,6 +12,7 @@ use async_trait::async_trait; use fuel_core_services::{ RunnableTask, StateWatcher, + TaskRunResult, }; use fuel_gas_price_algorithm::v0::{ AlgorithmUpdaterV0, @@ -121,24 +122,32 @@ where L2: L2BlockSource, Metadata: MetadataStorage, { - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { - let should_continue; + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { tokio::select! { biased; _ = watcher.while_started() => { tracing::debug!("Stopping gas price service"); - should_continue = false; + TaskRunResult::Stop } l2_block_res = self.l2_block_source.get_l2_block() => { tracing::info!("Received L2 block result: {:?}", l2_block_res); - let block = l2_block_res?; + let block = match l2_block_res { + Ok(block) => block, + Err(err) => { + return anyhow!(err).into() + } + }; tracing::debug!("Updating gas price algorithm"); - self.apply_block_info_to_gas_algorithm(block).await?; - should_continue = true; + match self.apply_block_info_to_gas_algorithm(block).await { + Ok(_) => {}, + Err(err) => { + return err.into() + } + } + TaskRunResult::Continue } } - Ok(should_continue) } async fn shutdown(mut self) -> anyhow::Result<()> { @@ -253,7 +262,7 @@ mod tests { let initial_price = read_algo.next_gas_price(); // when - service.run(&mut watcher).await.unwrap(); + service.run(&mut watcher).await; l2_block_sender.send(l2_block).await.unwrap(); service.shutdown().await.unwrap(); diff --git a/crates/services/gas_price_service/src/v0/tests.rs b/crates/services/gas_price_service/src/v0/tests.rs index c395b39aeba..53a0b5c61fa 100644 --- a/crates/services/gas_price_service/src/v0/tests.rs +++ b/crates/services/gas_price_service/src/v0/tests.rs @@ -170,7 +170,7 @@ async fn next_gas_price__affected_by_new_l2_block() { let mut watcher = StateWatcher::default(); // when - service.run(&mut watcher).await.unwrap(); + service.run(&mut watcher).await; l2_block_sender.send(l2_block).await.unwrap(); service.shutdown().await.unwrap(); @@ -213,7 +213,7 @@ async fn next__new_l2_block_saves_old_metadata() { let mut watcher = StateWatcher::default(); let start = read_algo.next_gas_price(); - service.run(&mut watcher).await.unwrap(); + service.run(&mut watcher).await; l2_block_sender.send(l2_block).await.unwrap(); service.shutdown().await.unwrap(); diff --git a/crates/services/gas_price_service/src/v1/da_source_service/service.rs b/crates/services/gas_price_service/src/v1/da_source_service/service.rs index 1f9cadf02dd..19c85395447 100644 --- a/crates/services/gas_price_service/src/v1/da_source_service/service.rs +++ b/crates/services/gas_price_service/src/v1/da_source_service/service.rs @@ -3,6 +3,7 @@ use fuel_core_services::{ RunnableTask, ServiceRunner, StateWatcher, + TaskRunResult, }; use std::time::Duration; use tokio::{ @@ -100,21 +101,23 @@ where { /// This function polls the source according to a polling interval /// described by the DaBlockCostsService - async fn run(&mut self, state_watcher: &mut StateWatcher) -> Result { - let continue_running; - + async fn run(&mut self, state_watcher: &mut StateWatcher) -> TaskRunResult { tokio::select! { biased; _ = state_watcher.while_started() => { - continue_running = false; + TaskRunResult::Stop } _ = self.poll_interval.tick() => { - let da_block_costs = self.source.request_da_block_cost().await?; - self.shared_state.0.send(da_block_costs)?; - continue_running = true; + match self.source.request_da_block_cost().await.and_then(|da_block_costs| self.shared_state.0.send(da_block_costs).map_err(|err| anyhow::anyhow!(err))) { + Ok(da_block_costs) => { + TaskRunResult::Continue + } + Err(err) => { + TaskRunResult::ErrorContinue(err) + } + } } } - Ok(continue_running) } /// There are no shutdown hooks required by the sources *yet* diff --git a/crates/services/p2p/src/service.rs b/crates/services/p2p/src/service.rs index 30c5dd9310a..7f2aad58e4a 100644 --- a/crates/services/p2p/src/service.rs +++ b/crates/services/p2p/src/service.rs @@ -38,6 +38,7 @@ use fuel_core_services::{ ServiceRunner, StateWatcher, SyncProcessor, + TaskRunResult, TraceErr, }; use fuel_core_storage::transactional::AtomicView; @@ -854,7 +855,7 @@ where B: Broadcast + 'static, T: TxPool + 'static, { - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { tracing::debug!("P2P task is running"); let mut should_continue; @@ -889,7 +890,7 @@ where let height = BlockHeight::from(block_height_range.end.saturating_sub(1)); let Some(peer) = self.p2p_service.get_peer_id_with_height(&height) else { let _ = channel.send(Err(TaskError::NoPeerFound)); - return Ok(should_continue); + return TaskRunResult::should_continue(should_continue) }; let channel = ResponseSender::SealedHeaders(channel); let request_msg = RequestMessage::SealedHeaders(block_height_range.clone()); @@ -899,7 +900,7 @@ where let height = BlockHeight::from(block_height_range.end.saturating_sub(1)); let Some(peer) = self.p2p_service.get_peer_id_with_height(&height) else { let _ = channel.send(Err(TaskError::NoPeerFound)); - return Ok(should_continue); + return TaskRunResult::should_continue(should_continue) }; let channel = ResponseSender::Transactions(channel); let request_msg = RequestMessage::Transactions(block_height_range.clone()); @@ -922,7 +923,12 @@ where } Some(TaskRequest::RespondWithGossipsubMessageReport((message, acceptance))) => { // report_message(&mut self.p2p_service, message, acceptance); - self.p2p_service.report_message(message, acceptance)?; + match self.p2p_service.report_message(message, acceptance) { + Ok(_) => {}, + Err(e) => { + return e.into() + } + }; } Some(TaskRequest::RespondWithPeerReport { peer_id, score, reporting_service }) => { let _ = self.p2p_service.report_peer(peer_id, score, reporting_service); @@ -975,7 +981,12 @@ where } }, Some(FuelP2PEvent::InboundRequestMessage { request_message, request_id }) => { - self.process_request(request_message, request_id)? + match self.process_request(request_message, request_id) { + Ok(_) => {}, + Err(err) => { + return err.into() + } + } }, Some(FuelP2PEvent::NewSubscription { peer_id, tag }) => { if tag == GossipTopicTag::NewTx { @@ -999,7 +1010,7 @@ where } tracing::debug!("P2P task is finished"); - Ok(should_continue) + TaskRunResult::should_continue(should_continue) } async fn shutdown(self) -> anyhow::Result<()> { @@ -1662,7 +1673,7 @@ pub mod tests { let mut watcher = StateWatcher::from(watch_receiver); // when - task.run(&mut watcher).await.unwrap(); + task.run(&mut watcher).await; // then let (report_peer_id, report, reporting_service) = @@ -1752,7 +1763,7 @@ pub mod tests { let mut watcher = StateWatcher::from(watch_receiver); // when - task.run(&mut watcher).await.unwrap(); + task.run(&mut watcher).await; // then let (report_peer_id, report, reporting_service) = @@ -1815,7 +1826,7 @@ pub mod tests { for _ in 0..100 { // When - task.run(&mut watcher).await.unwrap(); + task.run(&mut watcher).await; // Then block_processed_receiver diff --git a/crates/services/relayer/src/service.rs b/crates/services/relayer/src/service.rs index 7cf2b4519cf..f3e8e8aaf6b 100644 --- a/crates/services/relayer/src/service.rs +++ b/crates/services/relayer/src/service.rs @@ -28,6 +28,7 @@ use fuel_core_services::{ RunnableTask, ServiceRunner, StateWatcher, + TaskRunResult, }; use fuel_core_types::{ blockchain::primitives::DaBlockHeight, @@ -218,7 +219,7 @@ where P: Middleware + 'static, D: RelayerDb + 'static, { - async fn run(&mut self, _: &mut StateWatcher) -> anyhow::Result { + async fn run(&mut self, _: &mut StateWatcher) -> TaskRunResult { let now = tokio::time::Instant::now(); let result = run::run(self).await; @@ -238,14 +239,12 @@ where if let Err(err) = result { if !self.retry_on_error { tracing::error!("Exiting due to Error in relayer task: {:?}", err); - let should_continue = false; - Ok(should_continue) + TaskRunResult::Stop } else { - Err(err) + TaskRunResult::ErrorContinue(err) } } else { - let should_continue = true; - Ok(should_continue) + TaskRunResult::Continue } } diff --git a/crates/services/src/lib.rs b/crates/services/src/lib.rs index e7fa438631f..5da3ae612eb 100644 --- a/crates/services/src/lib.rs +++ b/crates/services/src/lib.rs @@ -80,6 +80,7 @@ pub use service::{ RunnableTask, Service, ServiceRunner, + TaskRunResult, }; pub use state::{ State, diff --git a/crates/services/src/service.rs b/crates/services/src/service.rs index 83cb095700a..f254b9a4b9b 100644 --- a/crates/services/src/service.rs +++ b/crates/services/src/service.rs @@ -83,6 +83,42 @@ pub trait RunnableService: Send { ) -> anyhow::Result; } +/// The result of a single iteration of the service task +pub enum TaskRunResult { + /// Request the task to be run again + Continue, + /// Request the task to be abandoned + Stop, + /// Request the task to be run again, but report an error + ErrorContinue(anyhow::Error), +} + +impl TaskRunResult { + /// Creates a `TaskRunResult` from a boolean value where `true` means `Continue` and `false` means `Stop` + pub fn should_continue(should_continue: bool) -> Self { + if should_continue { + TaskRunResult::Continue + } else { + TaskRunResult::Stop + } + } +} + +impl From> for TaskRunResult { + fn from(result: Result) -> Self { + match result { + Ok(should_continue) => TaskRunResult::should_continue(should_continue), + Err(e) => TaskRunResult::ErrorContinue(e), + } + } +} + +impl From for TaskRunResult { + fn from(e: anyhow::Error) -> Self { + TaskRunResult::ErrorContinue(e) + } +} + /// The trait is implemented by the service task and contains a single iteration of the infinity /// loop. #[async_trait::async_trait] @@ -96,7 +132,7 @@ pub trait RunnableTask: Send { /// `State::Started`. So first, the `run` method should return a value, and after, the service /// will stop. If the service should react to the state change earlier, it should handle it in /// the `run` loop on its own. See [`StateWatcher::while_started`]. - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result; + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult; /// Gracefully shutdowns the task after the end of the execution cycle. async fn shutdown(self) -> anyhow::Result<()>; @@ -361,14 +397,14 @@ async fn run_task( let result = tracked_result.extract(metric); match result { - Ok(should_continue) => { - if !should_continue { - tracing::debug!("stopping"); - break; - } + TaskRunResult::Continue => { tracing::debug!("run loop"); } - Err(e) => { + TaskRunResult::Stop => { + tracing::debug!("stopping"); + break; + } + TaskRunResult::ErrorContinue(e) => { let e: &dyn std::error::Error = &*e; tracing::error!(e); } @@ -447,7 +483,7 @@ mod tests { fn run<'_self, '_state, 'a>( &'_self mut self, state: &'_state mut StateWatcher - ) -> BoxFuture<'a, anyhow::Result> + ) -> BoxFuture<'a, TaskRunResult> where '_self: 'a, '_state: 'a, @@ -467,8 +503,7 @@ mod tests { let mut watcher = watcher.clone(); Box::pin(async move { watcher.while_started().await.unwrap(); - let should_continue = false; - Ok(should_continue) + TaskRunResult::Stop }) }); mock.expect_shutdown().times(1).returning(|| Ok(())); @@ -532,12 +567,8 @@ mod tests { mock.expect_shared_data().returning(|| EmptyShared); mock.expect_into_task().returning(|_, _| { let mut mock = MockTask::default(); - mock.expect_run().returning(|_| { - Box::pin(async move { - let should_continue = false; - Ok(should_continue) - }) - }); + mock.expect_run() + .returning(|_| Box::pin(async move { TaskRunResult::Stop })); mock.expect_shutdown() .times(1) .returning(|| panic!("Shutdown should fail")); diff --git a/crates/services/sync/src/service.rs b/crates/services/sync/src/service.rs index 7665f657a1c..0f68b6203ab 100644 --- a/crates/services/sync/src/service.rs +++ b/crates/services/sync/src/service.rs @@ -27,6 +27,7 @@ use fuel_core_services::{ ServiceRunner, SharedMutex, StateWatcher, + TaskRunResult, }; use fuel_core_types::fuel_types::BlockHeight; use futures::StreamExt; @@ -118,9 +119,9 @@ where E: BlockImporterPort + Send + Sync + 'static, C: ConsensusPort + Send + Sync + 'static, { - #[tracing::instrument(level = "debug", skip_all, err, ret)] - async fn run(&mut self, _: &mut StateWatcher) -> anyhow::Result { - Ok(self.sync_heights.sync().await.is_some()) + async fn run(&mut self, _: &mut StateWatcher) -> TaskRunResult { + let should_continue = self.sync_heights.sync().await.is_some(); + TaskRunResult::should_continue(should_continue) } async fn shutdown(self) -> anyhow::Result<()> { @@ -175,9 +176,8 @@ where E: BlockImporterPort + Send + Sync + 'static, C: ConsensusPort + Send + Sync + 'static, { - #[tracing::instrument(level = "debug", skip_all, err, ret)] - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { - self.0.import(watcher).await + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { + self.0.import(watcher).await.into() } async fn shutdown(self) -> anyhow::Result<()> { diff --git a/crates/services/txpool_v2/src/service.rs b/crates/services/txpool_v2/src/service.rs index c80952f7885..9e252d90401 100644 --- a/crates/services/txpool_v2/src/service.rs +++ b/crates/services/txpool_v2/src/service.rs @@ -1,6 +1,7 @@ use crate::{ self as fuel_core_txpool, }; +use fuel_core_services::TaskRunResult; use fuel_core_metrics::txpool_metrics::txpool_metrics; use fuel_core_services::{ @@ -224,43 +225,43 @@ impl RunnableTask for Task where View: TxPoolPersistentStorage, { - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { tokio::select! { biased; _ = watcher.while_started() => { - return Ok(false) + return TaskRunResult::Stop } block_result = self.subscriptions.imported_blocks.next() => { if let Some(result) = block_result { self.import_block(result); - return Ok(true) + return TaskRunResult::Continue } else { - return Ok(false) + return TaskRunResult::Stop } } select_transaction_request = self.subscriptions.borrow_txpool.recv() => { if let Some(select_transaction_request) = select_transaction_request { self.borrow_txpool(select_transaction_request); - return Ok(true) + return TaskRunResult::Continue } else { - return Ok(false) + return TaskRunResult::Stop } } _ = self.pruner.ttl_timer.tick() => { self.try_prune_transactions(); - return Ok(true) + return TaskRunResult::Continue } write_pool_request = self.subscriptions.write_pool.recv() => { if let Some(write_pool_request) = write_pool_request { self.process_write(write_pool_request); - return Ok(true) + return TaskRunResult::Continue } else { - return Ok(false) + return TaskRunResult::Continue } } @@ -269,27 +270,27 @@ where if let Some(tx) = data { self.manage_tx_from_p2p(tx, message_id, peer_id); } - return Ok(true) + return TaskRunResult::Continue } else { - return Ok(false) + return TaskRunResult::Stop } } new_peer_subscribed = self.subscriptions.new_tx_source.next() => { if let Some(peer_id) = new_peer_subscribed { self.manage_new_peer_subscribed(peer_id); - return Ok(true) + return TaskRunResult::Continue } else { - return Ok(false) + return TaskRunResult::Stop } } read_pool_request = self.subscriptions.read_pool.recv() => { if let Some(read_pool_request) = read_pool_request { self.process_read(read_pool_request); - return Ok(true) + return TaskRunResult::Continue } else { - return Ok(false) + return TaskRunResult::Stop } } } From 48d752b07e34d668499e594af71de8f991860006 Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Tue, 12 Nov 2024 18:00:15 +0700 Subject: [PATCH 02/11] Finish converting --- crates/fuel-core/src/graphql_api/api_service.rs | 15 ++++++++++----- .../fuel-core/src/graphql_api/worker_service.rs | 5 +++-- .../src/graphql_api/worker_service/tests.rs | 2 +- crates/fuel-core/src/service.rs | 3 +-- .../adapters/consensus_parameters_provider.rs | 10 +++++----- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/crates/fuel-core/src/graphql_api/api_service.rs b/crates/fuel-core/src/graphql_api/api_service.rs index 28a714f8b0e..dcf889a5881 100644 --- a/crates/fuel-core/src/graphql_api/api_service.rs +++ b/crates/fuel-core/src/graphql_api/api_service.rs @@ -64,6 +64,7 @@ use fuel_core_services::{ RunnableService, RunnableTask, StateWatcher, + TaskRunResult, }; use fuel_core_storage::transactional::AtomicView; use fuel_core_types::fuel_types::BlockHeight; @@ -196,11 +197,15 @@ impl RunnableService for GraphqlService { #[async_trait::async_trait] impl RunnableTask for Task { - async fn run(&mut self, _: &mut StateWatcher) -> anyhow::Result { - self.server.as_mut().await?; - // The `axum::Server` has its internal loop. If `await` is finished, we get an internal - // error or stop signal. - Ok(false /* should_continue */) + async fn run(&mut self, _: &mut StateWatcher) -> TaskRunResult { + match self.server.as_mut().await { + Ok(()) => { + // The `axum::Server` has its internal loop. If `await` is finished, we get an internal + // error or stop signal. + TaskRunResult::Stop + } + Err(err) => TaskRunResult::ErrorContinue(err.into()), + } } async fn shutdown(self) -> anyhow::Result<()> { diff --git a/crates/fuel-core/src/graphql_api/worker_service.rs b/crates/fuel-core/src/graphql_api/worker_service.rs index 959733d4919..c2744473fcc 100644 --- a/crates/fuel-core/src/graphql_api/worker_service.rs +++ b/crates/fuel-core/src/graphql_api/worker_service.rs @@ -36,6 +36,7 @@ use fuel_core_services::{ RunnableTask, ServiceRunner, StateWatcher, + TaskRunResult, }; use fuel_core_storage::{ Error as StorageError, @@ -551,7 +552,7 @@ where TxPool: ports::worker::TxPool, D: ports::worker::OffChainDatabase, { - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { let should_continue; tokio::select! { biased; @@ -577,7 +578,7 @@ where } } } - Ok(should_continue) + TaskRunResult::should_continue(should_continue) } async fn shutdown(mut self) -> anyhow::Result<()> { diff --git a/crates/fuel-core/src/graphql_api/worker_service/tests.rs b/crates/fuel-core/src/graphql_api/worker_service/tests.rs index 8b9ad758975..401d25db455 100644 --- a/crates/fuel-core/src/graphql_api/worker_service/tests.rs +++ b/crates/fuel-core/src/graphql_api/worker_service/tests.rs @@ -46,7 +46,7 @@ async fn run__relayed_transaction_events_are_added_to_storage() { // when let mut task = worker_task_with_block_importer_and_db(block_importer, database.clone()); - task.run(&mut state_watcher).await.unwrap(); + task.run(&mut state_watcher).await; tokio::time::sleep(tokio::time::Duration::from_millis(100)).await; // then diff --git a/crates/fuel-core/src/service.rs b/crates/fuel-core/src/service.rs index ca7f362a2a7..7449736c62f 100644 --- a/crates/fuel-core/src/service.rs +++ b/crates/fuel-core/src/service.rs @@ -444,8 +444,7 @@ impl RunnableTask for Task { // We received the stop signal from any of one source, so stop this service and // all sub-services. - let should_continue = false; - Ok(should_continue) + TaskRunResult::Stop } async fn shutdown(self) -> anyhow::Result<()> { diff --git a/crates/fuel-core/src/service/adapters/consensus_parameters_provider.rs b/crates/fuel-core/src/service/adapters/consensus_parameters_provider.rs index a0c54aac7be..ec7f7fa278c 100644 --- a/crates/fuel-core/src/service/adapters/consensus_parameters_provider.rs +++ b/crates/fuel-core/src/service/adapters/consensus_parameters_provider.rs @@ -10,6 +10,7 @@ use fuel_core_services::{ ServiceRunner, SharedMutex, StateWatcher, + TaskRunResult, }; use fuel_core_storage::{ not_found, @@ -111,7 +112,7 @@ impl SharedState { #[async_trait::async_trait] impl RunnableTask for Task { - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { let should_continue; tokio::select! { biased; @@ -135,8 +136,7 @@ impl RunnableTask for Task { } Err(err) => { tracing::error!("Failed to cache consensus parameters: {:?}", err); - should_continue = false; - return Ok(should_continue) + return TaskRunResult::Stop } } } @@ -144,7 +144,7 @@ impl RunnableTask for Task { } } - Ok(should_continue) + TaskRunResult::should_continue(should_continue) } async fn shutdown(self) -> anyhow::Result<()> { @@ -358,7 +358,7 @@ mod tests { // When let result_with_new_version = result_with_new_version(new_version); let _ = block_sender.send(result_with_new_version); - task.run(&mut StateWatcher::started()).await.unwrap(); + task.run(&mut StateWatcher::started()).await; // Then assert_eq!( From 0e8720a13c95d9019b15b50ac692eaf2ce1dfe4c Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Tue, 12 Nov 2024 18:01:29 +0700 Subject: [PATCH 03/11] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 053d3258a87..11f2d126194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Changed - [2378](https://github.com/FuelLabs/fuel-core/pull/2378): Use cached hash of the topic instead of calculating it on each publishing gossip message. +- [2429](https://github.com/FuelLabs/fuel-core/pull/2429): Introduce custom enum for representing result of running service tasks ## [Version 0.40.0] From d1c5a2a475b60446c07b907d85f7fb5cf9b0ca8d Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Tue, 12 Nov 2024 18:07:35 +0700 Subject: [PATCH 04/11] Fix spelling--unrelated to branch purpose --- .../client/assets/debugAdapterProtocol.json | 9090 ++++++++++------- 1 file changed, 5145 insertions(+), 3945 deletions(-) diff --git a/crates/client/assets/debugAdapterProtocol.json b/crates/client/assets/debugAdapterProtocol.json index 44a0c2eed9c..aeb42503296 100644 --- a/crates/client/assets/debugAdapterProtocol.json +++ b/crates/client/assets/debugAdapterProtocol.json @@ -1,3947 +1,5147 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Debug Adapter Protocol", - "description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.", - "type": "object", - - - "definitions": { - - "ProtocolMessage": { - "type": "object", - "title": "Base Protocol", - "description": "Base class of requests, responses, and events.", - "properties": { - "seq": { - "type": "integer", - "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." - }, - "type": { - "type": "string", - "description": "Message type.", - "_enum": [ "request", "response", "event" ] - } - }, - "required": [ "seq", "type" ] - }, - - "Request": { - "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { - "type": "object", - "description": "A client or debug adapter initiated request.", - "properties": { - "type": { - "type": "string", - "enum": [ "request" ] - }, - "command": { - "type": "string", - "description": "The command to execute." - }, - "arguments": { - "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], - "description": "Object containing arguments for the command." - } - }, - "required": [ "type", "command" ] - }] - }, - - "Event": { - "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { - "type": "object", - "description": "A debug adapter initiated event.", - "properties": { - "type": { - "type": "string", - "enum": [ "event" ] - }, - "event": { - "type": "string", - "description": "Type of event." - }, - "body": { - "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], - "description": "Event-specific information." - } - }, - "required": [ "type", "event" ] - }] - }, - - "Response": { - "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { - "type": "object", - "description": "Response for a request.", - "properties": { - "type": { - "type": "string", - "enum": [ "response" ] - }, - "request_seq": { - "type": "integer", - "description": "Sequence number of the corresponding request." - }, - "success": { - "type": "boolean", - "description": "Outcome of the request.\nIf true, the request was successful and the 'body' attribute may contain the result of the request.\nIf the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error')." - }, - "command": { - "type": "string", - "description": "The command requested." - }, - "message": { - "type": "string", - "description": "Contains the raw error in short form if 'success' is false.\nThis raw error might be interpreted by the frontend and is not shown in the UI.\nSome predefined values exist.", - "_enum": [ "cancelled" ], - "enumDescriptions": [ - "request was cancelled." - ] - }, - "body": { - "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], - "description": "Contains request result if success is true and optional error details if success is false." - } - }, - "required": [ "type", "request_seq", "success", "command" ] - }] - }, - - "ErrorResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "On error (whenever 'success' is false), the body can provide more details.", - "properties": { - "body": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Message", - "description": "An optional, structured error message." - } - } - } - }, - "required": [ "body" ] - }] - }, - - "CancelRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The 'cancel' request is used by the frontend in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence. Clients should only call this request if the capability 'supportsCancelRequest' is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honouring this request but there are no guarantees.\nThe 'cancel' request may return an error if it could not cancel an operation but a frontend should refrain from presenting this error to end users.\nA frontend client should only call this request if the capability 'supportsCancelRequest' is true.\nThe request that got canceled still needs to send a response back. This can either be a normal result ('success' attribute true)\nor an error response ('success' attribute false and the 'message' set to 'cancelled').\nReturning partial results from a cancelled request is possible but please note that a frontend client has no generic way for detecting that a response is partial or not.\n The progress that got cancelled still needs to send a 'progressEnd' event back.\n A client should not assume that progress just got cancelled after sending the 'cancel' request.", - "properties": { - "command": { - "type": "string", - "enum": [ "cancel" ] - }, - "arguments": { - "$ref": "#/definitions/CancelArguments" - } - }, - "required": [ "command" ] - }] - }, - "CancelArguments": { - "type": "object", - "description": "Arguments for 'cancel' request.", - "properties": { - "requestId": { - "type": "integer", - "description": "The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.\nBoth a 'requestId' and a 'progressId' can be specified in one request." - }, - "progressId": { - "type": "string", - "description": "The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.\nBoth a 'requestId' and a 'progressId' can be specified in one request." - } - } - }, - "CancelResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'cancel' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "InitializedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "title": "Events", - "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. SetBreakpointsRequest, SetExceptionBreakpointsRequest).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the 'initialize' request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends 'initialized' event (after the 'initialize' request has returned)\n- frontend sends zero or more 'setBreakpoints' requests\n- frontend sends one 'setFunctionBreakpoints' request (if capability 'supportsFunctionBreakpoints' is true)\n- frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false)\n- frontend sends other future configuration requests\n- frontend sends one 'configurationDone' request to indicate the end of the configuration.", - "properties": { - "event": { - "type": "string", - "enum": [ "initialized" ] - } - }, - "required": [ "event" ] - }] - }, - - "StoppedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a break point previously set, a stepping request has completed, by executing a debugger statement etc.", - "properties": { - "event": { - "type": "string", - "enum": [ "stopped" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the 'description' attribute is missing (but it must not be translated).", - "_enum": [ "step", "breakpoint", "exception", "pause", "entry", "goto", "function breakpoint", "data breakpoint", "instruction breakpoint" ] - }, - "description": { - "type": "string", - "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and must be translated." - }, - "threadId": { - "type": "integer", - "description": "The thread which was stopped." - }, - "preserveFocusHint": { - "type": "boolean", - "description": "A value of true hints to the frontend that this event should not change the focus." - }, - "text": { - "type": "string", - "description": "Additional information. E.g. if reason is 'exception', text contains the exception name. This string is shown in the UI." - }, - "allThreadsStopped": { - "type": "boolean", - "description": "If 'allThreadsStopped' is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given threadId can be expanded." - }, - "hitBreakpointIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Ids of the breakpoints that triggered the event. In most cases there will be only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." - } - }, - "required": [ "reason" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ContinuedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that the execution of the debuggee has continued.\nPlease note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. 'launch' or 'continue'.\nIt is only necessary to send a 'continued' event if there was no previous request that implied this.", - "properties": { - "event": { - "type": "string", - "enum": [ "continued" ] - }, - "body": { - "type": "object", - "properties": { - "threadId": { - "type": "integer", - "description": "The thread which was continued." - }, - "allThreadsContinued": { - "type": "boolean", - "description": "If 'allThreadsContinued' is true, a debug adapter can announce that all threads have continued." - } - }, - "required": [ "threadId" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ExitedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that the debuggee has exited and returns its exit code.", - "properties": { - "event": { - "type": "string", - "enum": [ "exited" ] - }, - "body": { - "type": "object", - "properties": { - "exitCode": { - "type": "integer", - "description": "The exit code returned from the debuggee." - } - }, - "required": [ "exitCode" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "TerminatedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.", - "properties": { - "event": { - "type": "string", - "enum": [ "terminated" ] - }, - "body": { - "type": "object", - "properties": { - "restart": { - "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], - "description": "A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests." - } - } - } - }, - "required": [ "event" ] - }] - }, - - "ThreadEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that a thread has started or exited.", - "properties": { - "event": { - "type": "string", - "enum": [ "thread" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "_enum": [ "started", "exited" ] - }, - "threadId": { - "type": "integer", - "description": "The identifier of the thread." - } - }, - "required": ["reason", "threadId"] - } - }, - "required": [ "event", "body" ] - }] - }, - - "OutputEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that the target has produced some output.", - "properties": { - "event": { - "type": "string", - "enum": [ "output" ] - }, - "body": { - "type": "object", - "properties": { - "category": { - "type": "string", - "description": "The output category. If not specified, 'console' is assumed.", - "_enum": [ "console", "stdout", "stderr", "telemetry" ] - }, - "output": { - "type": "string", - "description": "The output to report." - }, - "group": { - "type": "string", - "description": "Support for keeping an output log organized by grouping related messages.", - "enum": [ "start", "startCollapsed", "end" ], - "enumDescriptions": [ - "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe 'output' attribute becomes the name of the group and is not indented.", - "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe 'output' attribute becomes the name of the group and is not indented.", - "End the current group and decreases the indentation of subsequent output events.\nA non empty 'output' attribute is shown as the unindented end of the group." - ] - }, - "variablesReference": { - "type": "integer", - "description": "If an attribute 'variablesReference' exists and its value is > 0, the output contains objects which can be retrieved by passing 'variablesReference' to the 'variables' request. The value should be less than or equal to 2147483647 (2^31-1)." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "An optional source location where the output was produced." - }, - "line": { - "type": "integer", - "description": "An optional source location line where the output was produced." - }, - "column": { - "type": "integer", - "description": "An optional source location column where the output was produced." - }, - "data": { - "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], - "description": "Optional data to report. For the 'telemetry' category the data will be sent to telemetry, for the other categories the data is shown in JSON format." - } - }, - "required": ["output"] - } - }, - "required": [ "event", "body" ] - }] - }, - - "BreakpointEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that some information about a breakpoint has changed.", - "properties": { - "event": { - "type": "string", - "enum": [ "breakpoint" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "_enum": [ "changed", "new", "removed" ] - }, - "breakpoint": { - "$ref": "#/definitions/Breakpoint", - "description": "The 'id' attribute is used to find the target breakpoint and the other attributes are used as the new values." - } - }, - "required": [ "reason", "breakpoint" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ModuleEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that some information about a module has changed.", - "properties": { - "event": { - "type": "string", - "enum": [ "module" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "enum": [ "new", "changed", "removed" ] - }, - "module": { - "$ref": "#/definitions/Module", - "description": "The new, changed, or removed module. In case of 'removed' only the module id is used." - } - }, - "required": [ "reason", "module" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "LoadedSourceEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.", - "properties": { - "event": { - "type": "string", - "enum": [ "loadedSource" ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "enum": [ "new", "changed", "removed" ] - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The new, changed, or removed source." - } - }, - "required": [ "reason", "source" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ProcessEvent": { - "allOf": [ - { "$ref": "#/definitions/Event" }, - { - "type": "object", - "description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.", - "properties": { - "event": { - "type": "string", - "enum": [ "process" ] - }, - "body": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." - }, - "systemProcessId": { - "type": "integer", - "description": "The system process id of the debugged process. This property will be missing for non-system processes." - }, - "isLocalProcess": { - "type": "boolean", - "description": "If true, the process is running on the same computer as the debug adapter." - }, - "startMethod": { - "type": "string", - "enum": [ "launch", "attach", "attachForSuspendedLaunch" ], - "description": "Describes how the debug engine started debugging this process.", - "enumDescriptions": [ - "Process was launched under the debugger.", - "Debugger attached to an existing process.", - "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." - ] - }, - "pointerSize": { - "type": "integer", - "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." - } - }, - "required": [ "name" ] - } - }, - "required": [ "event", "body" ] - } - ] - }, - - "CapabilitiesEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the frontend and its UI, it might not be possible to change that at random times (or too late).\nConsequently this event has a hint characteristic: a frontend can only be expected to make a 'best effort' in honouring individual capabilities but there are no guarantees.\nOnly changed capabilities need to be included, all other capabilities keep their values.", - "properties": { - "event": { - "type": "string", - "enum": [ "capabilities" ] - }, - "body": { - "type": "object", - "properties": { - "capabilities": { - "$ref": "#/definitions/Capabilities", - "description": "The set of updated capabilities." - } - }, - "required": [ "capabilities" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ProgressStartEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event signals that a long running operation is about to start and\nprovides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", - "properties": { - "event": { - "type": "string", - "enum": [ "progressStart" ] - }, - "body": { - "type": "object", - "properties": { - "progressId": { - "type": "string", - "description": "An ID that must be used in subsequent 'progressUpdate' and 'progressEnd' events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." - }, - "title": { - "type": "string", - "description": "Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation." - }, - "requestId": { - "type": "integer", - "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit\nprogress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." - }, - "cancellable": { - "type": "boolean", - "description": "If true, the request that reports progress may be canceled with a 'cancel' request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." - }, - "message": { - "type": "string", - "description": "Optional, more detailed progress message." - }, - "percentage": { - "type": "number", - "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." - } - }, - "required": [ "progressId", "title" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ProgressUpdateEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event signals that the progress reporting needs to updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", - "properties": { - "event": { - "type": "string", - "enum": [ "progressUpdate" ] - }, - "body": { - "type": "object", - "properties": { - "progressId": { - "type": "string", - "description": "The ID that was introduced in the initial 'progressStart' event." - }, - "message": { - "type": "string", - "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." - }, - "percentage": { - "type": "number", - "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." - } - }, - "required": [ "progressId" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "ProgressEndEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "The event signals the end of the progress reporting with an optional final message.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", - "properties": { - "event": { - "type": "string", - "enum": [ "progressEnd" ] - }, - "body": { - "type": "object", - "properties": { - "progressId": { - "type": "string", - "description": "The ID that was introduced in the initial 'ProgressStartEvent'." - }, - "message": { - "type": "string", - "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." - } - }, - "required": [ "progressId" ] - } - }, - "required": [ "event", "body" ] - }] - }, - - "InvalidatedEvent": { - "allOf": [ { "$ref": "#/definitions/Event" }, { - "type": "object", - "description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.\nThis event should only be sent if the debug adapter has received a value true for the 'supportsInvalidatedEvent' capability of the 'initialize' request.", - "properties": { - "event": { - "type": "string", - "enum": [ "invalidated" ] - }, - "body": { - "type": "object", - "properties": { - "areas": { - "type": "array", - "description": "Optional set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honouring the areas but there are no guarantees. If this property is missing, empty, or if values are not understand the client should assume a single value 'all'.", - "items": { - "$ref": "#/definitions/InvalidatedAreas" - } - }, - "threadId": { - "type": "integer", - "description": "If specified, the client only needs to refetch data related to this thread." - }, - "stackFrameId": { - "type": "integer", - "description": "If specified, the client only needs to refetch data related to this stack frame (and the 'threadId' is ignored)." - } - } - } - }, - "required": [ "event", "body" ] - }] - }, - - "RunInTerminalRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "title": "Reverse Requests", - "description": "This optional request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the client has passed the value true for the 'supportsRunInTerminalRequest' capability of the 'initialize' request.", - "properties": { - "command": { - "type": "string", - "enum": [ "runInTerminal" ] - }, - "arguments": { - "$ref": "#/definitions/RunInTerminalRequestArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "RunInTerminalRequestArguments": { - "type": "object", - "description": "Arguments for 'runInTerminal' request.", - "properties": { - "kind": { - "type": "string", - "enum": [ "integrated", "external" ], - "description": "What kind of terminal to launch." - }, - "title": { - "type": "string", - "description": "Optional title of the terminal." - }, - "cwd": { - "type": "string", - "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of arguments. The first argument is the command to run." - }, - "env": { - "type": "object", - "description": "Environment key-value pairs that are added to or removed from the default environment.", - "additionalProperties": { - "type": [ "string", "null" ], - "description": "Proper values must be strings. A value of 'null' removes the variable from the environment." - } - } - }, - "required": [ "args", "cwd" ] - }, - "RunInTerminalResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'runInTerminal' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "processId": { - "type": "integer", - "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." - }, - "shellProcessId": { - "type": "integer", - "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." - } - } - } - }, - "required": [ "body" ] - }] - }, - - "InitializeRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "title": "Requests", - "description": "The 'initialize' request is sent as the first request from the client to the debug adapter\nin order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded to with an 'initialize' response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an 'initialize' response.\nThe 'initialize' request may only be sent once.", - "properties": { - "command": { - "type": "string", - "enum": [ "initialize" ] - }, - "arguments": { - "$ref": "#/definitions/InitializeRequestArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "InitializeRequestArguments": { - "type": "object", - "description": "Arguments for 'initialize' request.", - "properties": { - "clientID": { - "type": "string", - "description": "The ID of the (frontend) client using this adapter." - }, - "clientName": { - "type": "string", - "description": "The human readable name of the (frontend) client using this adapter." - }, - "adapterID": { - "type": "string", - "description": "The ID of the debug adapter." - }, - "locale": { - "type": "string", - "description": "The ISO-639 locale of the (frontend) client using this adapter, e.g. en-US or de-CH." - }, - "linesStartAt1": { - "type": "boolean", - "description": "If true all line numbers are 1-based (default)." - }, - "columnsStartAt1": { - "type": "boolean", - "description": "If true all column numbers are 1-based (default)." - }, - "pathFormat": { - "type": "string", - "_enum": [ "path", "uri" ], - "description": "Determines in what format paths are specified. The default is 'path', which is the native format." - }, - "supportsVariableType": { - "type": "boolean", - "description": "Client supports the optional type attribute for variables." - }, - "supportsVariablePaging": { - "type": "boolean", - "description": "Client supports the paging of variables." - }, - "supportsRunInTerminalRequest": { - "type": "boolean", - "description": "Client supports the runInTerminal request." - }, - "supportsMemoryReferences": { - "type": "boolean", - "description": "Client supports memory references." - }, - "supportsProgressReporting": { - "type": "boolean", - "description": "Client supports progress reporting." - }, - "supportsInvalidatedEvent": { - "type": "boolean", - "description": "Client supports the invalidated event." - } - }, - "required": [ "adapterID" ] - }, - "InitializeResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'initialize' request.", - "properties": { - "body": { - "$ref": "#/definitions/Capabilities", - "description": "The capabilities of this debug adapter." - } - } - }] - }, - - "ConfigurationDoneRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "This optional request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the 'initialized' event).\nClients should only call this request if the capability 'supportsConfigurationDoneRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "configurationDone" ] - }, - "arguments": { - "$ref": "#/definitions/ConfigurationDoneArguments" - } - }, - "required": [ "command" ] - }] - }, - "ConfigurationDoneArguments": { - "type": "object", - "description": "Arguments for 'configurationDone' request." - }, - "ConfigurationDoneResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'configurationDone' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "LaunchRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if 'noDebug' is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.", - "properties": { - "command": { - "type": "string", - "enum": [ "launch" ] - }, - "arguments": { - "$ref": "#/definitions/LaunchRequestArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "LaunchRequestArguments": { - "type": "object", - "description": "Arguments for 'launch' request. Additional attributes are implementation specific.", - "properties": { - "noDebug": { - "type": "boolean", - "description": "If noDebug is true the launch request should launch the program without enabling debugging." - }, - "__restart": { - "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], - "description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact." - } - } - }, - "LaunchResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'launch' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "AttachRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The attach request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.", - "properties": { - "command": { - "type": "string", - "enum": [ "attach" ] - }, - "arguments": { - "$ref": "#/definitions/AttachRequestArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "AttachRequestArguments": { - "type": "object", - "description": "Arguments for 'attach' request. Additional attributes are implementation specific.", - "properties": { - "__restart": { - "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], - "description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact." - } - } - }, - "AttachResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'attach' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "RestartRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Restarts a debug session. Clients should only call this request if the capability 'supportsRestartRequest' is true.\nIf the capability is missing or has the value false, a typical client will emulate 'restart' by terminating the debug adapter first and then launching it anew.", - "properties": { - "command": { - "type": "string", - "enum": [ "restart" ] - }, - "arguments": { - "$ref": "#/definitions/RestartArguments" - } - }, - "required": [ "command" ] - }] - }, - "RestartArguments": { - "type": "object", - "description": "Arguments for 'restart' request.", - "properties": { - "arguments": { - "oneOf": [ - { "$ref": "#/definitions/LaunchRequestArguments" }, - { "$ref": "#/definitions/AttachRequestArguments" } - ], - "description": "The latest version of the 'launch' or 'attach' configuration." - } - } - }, - "RestartResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'restart' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "DisconnectRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging.\nIt asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter.\nIf the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the debuggee.\nIf the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the debuggee.\nThis behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug adapter).", - "properties": { - "command": { - "type": "string", - "enum": [ "disconnect" ] - }, - "arguments": { - "$ref": "#/definitions/DisconnectArguments" - } - }, - "required": [ "command" ] - }] - }, - "DisconnectArguments": { - "type": "object", - "description": "Arguments for 'disconnect' request.", - "properties": { - "restart": { - "type": "boolean", - "description": "A value of true indicates that this 'disconnect' request is part of a restart sequence." - }, - "terminateDebuggee": { - "type": "boolean", - "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the capability 'supportTerminateDebuggee' is true." - }, - "suspendDebuggee": { - "type": "boolean", - "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the capability 'supportSuspendDebuggee' is true." - } - } - }, - "DisconnectResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'disconnect' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "TerminateRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself.\nClients should only call this request if the capability 'supportsTerminateRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "terminate" ] - }, - "arguments": { - "$ref": "#/definitions/TerminateArguments" - } - }, - "required": [ "command" ] - }] - }, - "TerminateArguments": { - "type": "object", - "description": "Arguments for 'terminate' request.", - "properties": { - "restart": { - "type": "boolean", - "description": "A value of true indicates that this 'terminate' request is part of a restart sequence." - } - } - }, - "TerminateResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'terminate' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "BreakpointLocationsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range.\nClients should only call this request if the capability 'supportsBreakpointLocationsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "breakpointLocations" ] - }, - "arguments": { - "$ref": "#/definitions/BreakpointLocationsArguments" - } - }, - "required": [ "command" ] - }] - - }, - "BreakpointLocationsArguments": { - "type": "object", - "description": "Arguments for 'breakpointLocations' request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified." - }, - "line": { - "type": "integer", - "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line." - }, - "column": { - "type": "integer", - "description": "Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed." - }, - "endLine": { - "type": "integer", - "description": "Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line." - }, - "endColumn": { - "type": "integer", - "description": "Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line." - } - }, - "required": [ "source", "line" ] - }, - "BreakpointLocationsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'breakpointLocations' request.\nContains possible locations for source breakpoints.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/BreakpointLocation" - }, - "description": "Sorted set of possible breakpoint locations." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetBreakpointsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.\nTo clear all breakpoint for a source, specify an empty array.\nWhen a breakpoint is hit, a 'stopped' event (with reason 'breakpoint') is generated.", - "properties": { - "command": { - "type": "string", - "enum": [ "setBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setBreakpoints' request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified." - }, - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/SourceBreakpoint" - }, - "description": "The code locations of the breakpoints." - }, - "lines": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Deprecated: The code locations of the breakpoints." - }, - "sourceModified": { - "type": "boolean", - "description": "A value of true indicates that the underlying source has been modified which results in new breakpoint locations." - } - }, - "required": [ "source" ] - }, - "SetBreakpointsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'setBreakpoints' request.\nReturned is information about each breakpoint created by this request.\nThis includes the actual code location and whether the breakpoint could be verified.\nThe breakpoints returned are in the same order as the elements of the 'breakpoints'\n(or the deprecated 'lines') array in the arguments.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetFunctionBreakpointsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated.\nClients should only call this request if the capability 'supportsFunctionBreakpoints' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "setFunctionBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetFunctionBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetFunctionBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setFunctionBreakpoints' request.", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/FunctionBreakpoint" - }, - "description": "The function names of the breakpoints." - } - }, - "required": [ "breakpoints" ] - }, - "SetFunctionBreakpointsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'setFunctionBreakpoints' request.\nReturned is information about each breakpoint created by this request.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetExceptionBreakpointsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request configures the debuggers response to thrown exceptions.\nIf an exception is configured to break, a 'stopped' event is fired (with reason 'exception').\nClients should only call this request if the capability 'exceptionBreakpointFilters' returns one or more filters.", - "properties": { - "command": { - "type": "string", - "enum": [ "setExceptionBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetExceptionBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetExceptionBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setExceptionBreakpoints' request.", - "properties": { - "filters": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the 'exceptionBreakpointFilters' capability. The 'filter' and 'filterOptions' sets are additive." - }, - "filterOptions": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionFilterOptions" - }, - "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the 'exceptionBreakpointFilters' capability. This attribute is only honored by a debug adapter if the capability 'supportsExceptionFilterOptions' is true. The 'filter' and 'filterOptions' sets are additive." - }, - "exceptionOptions": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionOptions" - }, - "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the capability 'supportsExceptionOptions' is true." - } - }, - "required": [ "filters" ] - }, - "SetExceptionBreakpointsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'setExceptionBreakpoints' request.\nThe response contains an array of Breakpoint objects with information about each exception breakpoint or filter. The Breakpoint objects are in the same order as the elements of the 'filters', 'filterOptions', 'exceptionOptions' arrays given as arguments. If both 'filters' and 'filterOptions' are given, the returned array must start with 'filters' information first, followed by 'filterOptions' information.\nThe mandatory 'verified' property of a Breakpoint object signals whether the exception breakpoint or filter could be successfully created and whether the optional condition or hit count expressions are valid. In case of an error the 'message' property explains the problem. An optional 'id' property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.\nFor backward compatibility both the 'breakpoints' array and the enclosing 'body' are optional. If these elements are missing a client will not be able to show problems for individual exception breakpoints or filters.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the 'filters', 'filterOptions', 'exceptionOptions' arrays in the arguments. If both 'filters' and 'filterOptions' are given, the returned array must start with 'filters' information first, followed by 'filterOptions' information." - } - } - } - } - }] - }, - - "DataBreakpointInfoRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "dataBreakpointInfo" ] - }, - "arguments": { - "$ref": "#/definitions/DataBreakpointInfoArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "DataBreakpointInfoArguments": { - "type": "object", - "description": "Arguments for 'dataBreakpointInfo' request.", - "properties": { - "variablesReference": { - "type": "integer", - "description": "Reference to the Variable container if the data breakpoint is requested for a child of the container." - }, - "name": { - "type": "string", - "description": "The name of the Variable's child to obtain data breakpoint information for.\nIf variablesReference isn’t provided, this can be an expression." - } - }, - "required": [ "name" ] - }, - "DataBreakpointInfoResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'dataBreakpointInfo' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "dataId": { - "type": [ "string", "null" ], - "description": "An identifier for the data on which a data breakpoint can be registered with the setDataBreakpoints request or null if no data breakpoint is available." - }, - "description": { - "type": "string", - "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." - }, - "accessTypes": { - "type": "array", - "items": { - "$ref": "#/definitions/DataBreakpointAccessType" - }, - "description": "Optional attribute listing the available access types for a potential data breakpoint. A UI frontend could surface this information." - }, - "canPersist": { - "type": "boolean", - "description": "Optional attribute indicating that a potential data breakpoint could be persisted across sessions." - } - }, - "required": [ "dataId", "description" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetDataBreakpointsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "setDataBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetDataBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetDataBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setDataBreakpoints' request.", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/DataBreakpoint" - }, - "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." - } - }, - "required": [ "breakpoints" ] - }, - "SetDataBreakpointsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'setDataBreakpoints' request.\nReturned is information about each breakpoint created by this request.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument 'breakpoints' array." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetInstructionBreakpointsRequest": { - "allOf": [ - { "$ref": "#/definitions/Request" }, - { - "type": "object", - "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a diassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a 'stopped' event (with reason 'instruction breakpoint') is generated.\nClients should only call this request if the capability 'supportsInstructionBreakpoints' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "setInstructionBreakpoints" ] - }, - "arguments": { - "$ref": "#/definitions/SetInstructionBreakpointsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetInstructionBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setInstructionBreakpoints' request", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/InstructionBreakpoint" - }, - "description": "The instruction references of the breakpoints" - } - }, - "required": ["breakpoints"] - }, - "SetInstructionBreakpointsResponse": { - "allOf": [ - { "$ref": "#/definitions/Response" }, - { - "type": "object", - "description": "Response to 'setInstructionBreakpoints' request", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." - } - }, - "required": [ "breakpoints" ] - } - }, - "required": [ "body" ] - }] - }, - - "ContinueRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request starts the debuggee to run again.", - "properties": { - "command": { - "type": "string", - "enum": [ "continue" ] - }, - "arguments": { - "$ref": "#/definitions/ContinueArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ContinueArguments": { - "type": "object", - "description": "Arguments for 'continue' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Continue execution for the specified thread (if possible).\nIf the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true." - } - }, - "required": [ "threadId" ] - }, - "ContinueResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'continue' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "allThreadsContinued": { - "type": "boolean", - "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead.\nIf this attribute is missing a value of 'true' is assumed for backward compatibility." - } - } - } - }, - "required": [ "body" ] - }] - }, - - "NextRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request starts the debuggee to run again for one step.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.", - "properties": { - "command": { - "type": "string", - "enum": [ "next" ] - }, - "arguments": { - "$ref": "#/definitions/NextArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "NextArguments": { - "type": "object", - "description": "Arguments for 'next' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'next' for this thread." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." - } - }, - "required": [ "threadId" ] - }, - "NextResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'next' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "StepInRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request starts the debuggee to step into a function/method if possible.\nIf it cannot step into a target, 'stepIn' behaves like 'next'.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.\nIf there are multiple function/method calls (or other targets) on the source line,\nthe optional argument 'targetId' can be used to control into which target the 'stepIn' should occur.\nThe list of possible targets for a given source line can be retrieved via the 'stepInTargets' request.", - "properties": { - "command": { - "type": "string", - "enum": [ "stepIn" ] - }, - "arguments": { - "$ref": "#/definitions/StepInArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StepInArguments": { - "type": "object", - "description": "Arguments for 'stepIn' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'stepIn' for this thread." - }, - "targetId": { - "type": "integer", - "description": "Optional id of the target to step into." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." - } - }, - "required": [ "threadId" ] - }, - "StepInResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'stepIn' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "StepOutRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request starts the debuggee to run again for one step.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.", - "properties": { - "command": { - "type": "string", - "enum": [ "stepOut" ] - }, - "arguments": { - "$ref": "#/definitions/StepOutArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StepOutArguments": { - "type": "object", - "description": "Arguments for 'stepOut' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'stepOut' for this thread." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." - } - }, - "required": [ "threadId" ] - }, - "StepOutResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'stepOut' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "StepBackRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request starts the debuggee to run one step backwards.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.\nClients should only call this request if the capability 'supportsStepBack' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "stepBack" ] - }, - "arguments": { - "$ref": "#/definitions/StepBackArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StepBackArguments": { - "type": "object", - "description": "Arguments for 'stepBack' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'stepBack' for this thread." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." - } - }, - "required": [ "threadId" ] - }, - "StepBackResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'stepBack' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "ReverseContinueRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request starts the debuggee to run backward.\nClients should only call this request if the capability 'supportsStepBack' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "reverseContinue" ] - }, - "arguments": { - "$ref": "#/definitions/ReverseContinueArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ReverseContinueArguments": { - "type": "object", - "description": "Arguments for 'reverseContinue' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'reverseContinue' for this thread." - } - }, - "required": [ "threadId" ] - }, - "ReverseContinueResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'reverseContinue' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "RestartFrameRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request restarts execution of the specified stackframe.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'restart') after the restart has completed.\nClients should only call this request if the capability 'supportsRestartFrame' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "restartFrame" ] - }, - "arguments": { - "$ref": "#/definitions/RestartFrameArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "RestartFrameArguments": { - "type": "object", - "description": "Arguments for 'restartFrame' request.", - "properties": { - "frameId": { - "type": "integer", - "description": "Restart this stackframe." - } - }, - "required": [ "frameId" ] - }, - "RestartFrameResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'restartFrame' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "GotoRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to executed code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a 'stopped' event with reason 'goto'.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true (because only then goto targets exist that can be passed as arguments).", - "properties": { - "command": { - "type": "string", - "enum": [ "goto" ] - }, - "arguments": { - "$ref": "#/definitions/GotoArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "GotoArguments": { - "type": "object", - "description": "Arguments for 'goto' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Set the goto target for this thread." - }, - "targetId": { - "type": "integer", - "description": "The location where the debuggee will continue to run." - } - }, - "required": [ "threadId", "targetId" ] - }, - "GotoResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'goto' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "PauseRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request suspends the debuggee.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'pause') after the thread has been paused successfully.", - "properties": { - "command": { - "type": "string", - "enum": [ "pause" ] - }, - "arguments": { - "$ref": "#/definitions/PauseArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "PauseArguments": { - "type": "object", - "description": "Arguments for 'pause' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Pause execution for this thread." - } - }, - "required": [ "threadId" ] - }, - "PauseResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'pause' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "StackTraceRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' capability is true, stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached.", - "properties": { - "command": { - "type": "string", - "enum": [ "stackTrace" ] - }, - "arguments": { - "$ref": "#/definitions/StackTraceArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StackTraceArguments": { - "type": "object", - "description": "Arguments for 'stackTrace' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Retrieve the stacktrace for this thread." - }, - "startFrame": { - "type": "integer", - "description": "The index of the first frame to return; if omitted frames start at 0." - }, - "levels": { - "type": "integer", - "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." - }, - "format": { - "$ref": "#/definitions/StackFrameFormat", - "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." - } - }, - "required": [ "threadId" ] - }, - "StackTraceResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'stackTrace' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "stackFrames": { - "type": "array", - "items": { - "$ref": "#/definitions/StackFrame" - }, - "description": "The frames of the stackframe. If the array has length zero, there are no stackframes available.\nThis means that there is no location information available." - }, - "totalFrames": { - "type": "integer", - "description": "The total number of frames available in the stack. If omitted or if totalFrames is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing totalFrames values for subsequent requests can be used to enforce paging in the client." - } - }, - "required": [ "stackFrames" ] - } - }, - "required": [ "body" ] - }] - }, - - "ScopesRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request returns the variable scopes for a given stackframe ID.", - "properties": { - "command": { - "type": "string", - "enum": [ "scopes" ] - }, - "arguments": { - "$ref": "#/definitions/ScopesArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ScopesArguments": { - "type": "object", - "description": "Arguments for 'scopes' request.", - "properties": { - "frameId": { - "type": "integer", - "description": "Retrieve the scopes for this stackframe." - } - }, - "required": [ "frameId" ] - }, - "ScopesResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'scopes' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "scopes": { - "type": "array", - "items": { - "$ref": "#/definitions/Scope" - }, - "description": "The scopes of the stackframe. If the array has length zero, there are no scopes available." - } - }, - "required": [ "scopes" ] - } - }, - "required": [ "body" ] - }] - }, - - "VariablesRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Retrieves all child variables for the given variable reference.\nAn optional filter can be used to limit the fetched children to either named or indexed children.", - "properties": { - "command": { - "type": "string", - "enum": [ "variables" ] - }, - "arguments": { - "$ref": "#/definitions/VariablesArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "VariablesArguments": { - "type": "object", - "description": "Arguments for 'variables' request.", - "properties": { - "variablesReference": { - "type": "integer", - "description": "The Variable reference." - }, - "filter": { - "type": "string", - "enum": [ "indexed", "named" ], - "description": "Optional filter to limit the child variables to either named or indexed. If omitted, both types are fetched." - }, - "start": { - "type": "integer", - "description": "The index of the first variable to return; if omitted children start at 0." - }, - "count": { - "type": "integer", - "description": "The number of variables to return. If count is missing or 0, all variables are returned." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." - } - }, - "required": [ "variablesReference" ] - }, - "VariablesResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'variables' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "variables": { - "type": "array", - "items": { - "$ref": "#/definitions/Variable" - }, - "description": "All (or a range) of variables for the given variable reference." - } - }, - "required": [ "variables" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetVariableRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the capability 'supportsSetVariable' is true.\nIf a debug adapter implements both setVariable and setExpression, a client will only use setExpression if the variable has an evaluateName property.", - "properties": { - "command": { - "type": "string", - "enum": [ "setVariable" ] - }, - "arguments": { - "$ref": "#/definitions/SetVariableArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetVariableArguments": { - "type": "object", - "description": "Arguments for 'setVariable' request.", - "properties": { - "variablesReference": { - "type": "integer", - "description": "The reference of the variable container." - }, - "name": { - "type": "string", - "description": "The name of the variable in the container." - }, - "value": { - "type": "string", - "description": "The value of the variable." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the response value." - } - }, - "required": [ "variablesReference", "name", "value" ] - }, - "SetVariableResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'setVariable' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The new value of the variable." - }, - "type": { - "type": "string", - "description": "The type of the new value. Typically shown in the UI when hovering over the value." - }, - "variablesReference": { - "type": "integer", - "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - } - }, - "required": [ "value" ] - } - }, - "required": [ "body" ] - }] - }, - - "SourceRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request retrieves the source code for a given source reference.", - "properties": { - "command": { - "type": "string", - "enum": [ "source" ] - }, - "arguments": { - "$ref": "#/definitions/SourceArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SourceArguments": { - "type": "object", - "description": "Arguments for 'source' request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "Specifies the source content to load. Either source.path or source.sourceReference must be specified." - }, - "sourceReference": { - "type": "integer", - "description": "The reference to the source. This is the same as source.sourceReference.\nThis is provided for backward compatibility since old backends do not understand the 'source' attribute." - } - }, - "required": [ "sourceReference" ] - }, - "SourceResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'source' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "Content of the source reference." - }, - "mimeType": { - "type": "string", - "description": "Optional content type (mime type) of the source." - } - }, - "required": [ "content" ] - } - }, - "required": [ "body" ] - }] - }, - - "ThreadsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request retrieves a list of all threads.", - "properties": { - "command": { - "type": "string", - "enum": [ "threads" ] - } - }, - "required": [ "command" ] - }] - }, - "ThreadsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'threads' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "threads": { - "type": "array", - "items": { - "$ref": "#/definitions/Thread" - }, - "description": "All threads." - } - }, - "required": [ "threads" ] - } - }, - "required": [ "body" ] - }] - }, - - "TerminateThreadsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "The request terminates the threads with the given ids.\nClients should only call this request if the capability 'supportsTerminateThreadsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "terminateThreads" ] - }, - "arguments": { - "$ref": "#/definitions/TerminateThreadsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "TerminateThreadsArguments": { - "type": "object", - "description": "Arguments for 'terminateThreads' request.", - "properties": { - "threadIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Ids of threads to be terminated." - } - } - }, - "TerminateThreadsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'terminateThreads' request. This is just an acknowledgement, so no body field is required." - }] - }, - - "ModulesRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.\nClients should only call this request if the capability 'supportsModulesRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "modules" ] - }, - "arguments": { - "$ref": "#/definitions/ModulesArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ModulesArguments": { - "type": "object", - "description": "Arguments for 'modules' request.", - "properties": { - "startModule": { - "type": "integer", - "description": "The index of the first module to return; if omitted modules start at 0." - }, - "moduleCount": { - "type": "integer", - "description": "The number of modules to return. If moduleCount is not specified or 0, all modules are returned." - } - } - }, - "ModulesResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'modules' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "modules": { - "type": "array", - "items": { - "$ref": "#/definitions/Module" - }, - "description": "All modules or range of modules." - }, - "totalModules": { - "type": "integer", - "description": "The total number of modules available." - } - }, - "required": [ "modules" ] - } - }, - "required": [ "body" ] - }] - }, - - "LoadedSourcesRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Retrieves the set of all sources currently loaded by the debugged process.\nClients should only call this request if the capability 'supportsLoadedSourcesRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "loadedSources" ] - }, - "arguments": { - "$ref": "#/definitions/LoadedSourcesArguments" - } - }, - "required": [ "command" ] - }] - }, - "LoadedSourcesArguments": { - "type": "object", - "description": "Arguments for 'loadedSources' request." - }, - "LoadedSourcesResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'loadedSources' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "sources": { - "type": "array", - "items": { - "$ref": "#/definitions/Source" - }, - "description": "Set of loaded sources." - } - }, - "required": [ "sources" ] - } - }, - "required": [ "body" ] - }] - }, - - "EvaluateRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Evaluates the given expression in the context of the top most stack frame.\nThe expression has access to any variables and arguments that are in scope.", - "properties": { - "command": { - "type": "string", - "enum": [ "evaluate" ] - }, - "arguments": { - "$ref": "#/definitions/EvaluateArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "EvaluateArguments": { - "type": "object", - "description": "Arguments for 'evaluate' request.", - "properties": { - "expression": { - "type": "string", - "description": "The expression to evaluate." - }, - "frameId": { - "type": "integer", - "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope." - }, - "context": { - "type": "string", - "_enum": [ "watch", "repl", "hover", "clipboard" ], - "enumDescriptions": [ - "evaluate is run in a watch.", - "evaluate is run from REPL console.", - "evaluate is run from a data hover.", - "evaluate is run to generate the value that will be stored in the clipboard.\nThe attribute is only honored by a debug adapter if the capability 'supportsClipboardContext' is true." - ], - "description": "The context in which the evaluate request is run." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the Evaluate result.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." - } - }, - "required": [ "expression" ] - }, - "EvaluateResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'evaluate' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "result": { - "type": "string", - "description": "The result of the evaluate request." - }, - "type": { - "type": "string", - "description": "The optional type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." - }, - "presentationHint": { - "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of a evaluate result that can be used to determine how to render the result in the UI." - }, - "variablesReference": { - "type": "integer", - "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "memoryReference": { - "type": "string", - "description": "Optional memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute should be returned by a debug adapter if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." - } - }, - "required": [ "result", "variablesReference" ] - } - }, - "required": [ "body" ] - }] - }, - - "SetExpressionRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Evaluates the given 'value' expression and assigns it to the 'expression' which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the capability 'supportsSetExpression' is true.\nIf a debug adapter implements both setExpression and setVariable, a client will only use setExpression if the variable has an evaluateName property.", - "properties": { - "command": { - "type": "string", - "enum": [ "setExpression" ] - }, - "arguments": { - "$ref": "#/definitions/SetExpressionArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "SetExpressionArguments": { - "type": "object", - "description": "Arguments for 'setExpression' request.", - "properties": { - "expression": { - "type": "string", - "description": "The l-value expression to assign to." - }, - "value": { - "type": "string", - "description": "The value expression to assign to the l-value expression." - }, - "frameId": { - "type": "integer", - "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies how the resulting value should be formatted." - } - }, - "required": [ "expression", "value" ] - }, - "SetExpressionResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'setExpression' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The new value of the expression." - }, - "type": { - "type": "string", - "description": "The optional type of the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." - }, - "presentationHint": { - "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of a value that can be used to determine how to render the result in the UI." - }, - "variablesReference": { - "type": "integer", - "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - } - }, - "required": [ "value" ] - } - }, - "required": [ "body" ] - }] - }, - - "StepInTargetsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "This request retrieves the possible stepIn targets for the specified stack frame.\nThese targets can be used in the 'stepIn' request.\nThe StepInTargets may only be called if the 'supportsStepInTargetsRequest' capability exists and is true.\nClients should only call this request if the capability 'supportsStepInTargetsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "stepInTargets" ] - }, - "arguments": { - "$ref": "#/definitions/StepInTargetsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "StepInTargetsArguments": { - "type": "object", - "description": "Arguments for 'stepInTargets' request.", - "properties": { - "frameId": { - "type": "integer", - "description": "The stack frame for which to retrieve the possible stepIn targets." - } - }, - "required": [ "frameId" ] - }, - "StepInTargetsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'stepInTargets' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/StepInTarget" - }, - "description": "The possible stepIn targets of the specified source location." - } - }, - "required": [ "targets" ] - } - }, - "required": [ "body" ] - }] - }, - - "GotoTargetsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the 'goto' request.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "gotoTargets" ] - }, - "arguments": { - "$ref": "#/definitions/GotoTargetsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "GotoTargetsArguments": { - "type": "object", - "description": "Arguments for 'gotoTargets' request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "The source location for which the goto targets are determined." - }, - "line": { - "type": "integer", - "description": "The line location for which the goto targets are determined." - }, - "column": { - "type": "integer", - "description": "An optional column location for which the goto targets are determined." - } - }, - "required": [ "source", "line" ] - }, - "GotoTargetsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'gotoTargets' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/GotoTarget" - }, - "description": "The possible goto targets of the specified location." - } - }, - "required": [ "targets" ] - } - }, - "required": [ "body" ] - }] - }, - - "CompletionsRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Returns a list of possible completions for a given caret position and text.\nClients should only call this request if the capability 'supportsCompletionsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "completions" ] - }, - "arguments": { - "$ref": "#/definitions/CompletionsArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "CompletionsArguments": { - "type": "object", - "description": "Arguments for 'completions' request.", - "properties": { - "frameId": { - "type": "integer", - "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope." - }, - "text": { - "type": "string", - "description": "One or more source lines. Typically this is the text a user has typed into the debug console before he asked for completion." - }, - "column": { - "type": "integer", - "description": "The character position for which to determine the completion proposals." - }, - "line": { - "type": "integer", - "description": "An optional line for which to determine the completion proposals. If missing the first line of the text is assumed." - } - }, - "required": [ "text", "column" ] - }, - "CompletionsResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'completions' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/CompletionItem" - }, - "description": "The possible completions for ." - } - }, - "required": [ "targets" ] - } - }, - "required": [ "body" ] - }] - }, - - "ExceptionInfoRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Retrieves the details of the exception that caused this event to be raised.\nClients should only call this request if the capability 'supportsExceptionInfoRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "exceptionInfo" ] - }, - "arguments": { - "$ref": "#/definitions/ExceptionInfoArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ExceptionInfoArguments": { - "type": "object", - "description": "Arguments for 'exceptionInfo' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Thread for which exception information should be retrieved." - } - }, - "required": [ "threadId" ] - }, - "ExceptionInfoResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'exceptionInfo' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "exceptionId": { - "type": "string", - "description": "ID of the exception that was thrown." - }, - "description": { - "type": "string", - "description": "Descriptive text for the exception provided by the debug adapter." - }, - "breakMode": { - "$ref": "#/definitions/ExceptionBreakMode", - "description": "Mode that caused the exception notification to be raised." - }, - "details": { - "$ref": "#/definitions/ExceptionDetails", - "description": "Detailed information about the exception." - } - }, - "required": [ "exceptionId", "breakMode" ] - } - }, - "required": [ "body" ] - }] - }, - - "ReadMemoryRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Reads bytes from memory at the provided location.\nClients should only call this request if the capability 'supportsReadMemoryRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "readMemory" ] - }, - "arguments": { - "$ref": "#/definitions/ReadMemoryArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "ReadMemoryArguments": { - "type": "object", - "description": "Arguments for 'readMemory' request.", - "properties": { - "memoryReference": { - "type": "string", - "description": "Memory reference to the base location from which data should be read." - }, - "offset": { - "type": "integer", - "description": "Optional offset (in bytes) to be applied to the reference location before reading data. Can be negative." - }, - "count": { - "type": "integer", - "description": "Number of bytes to read at the specified location and offset." - } - }, - "required": [ "memoryReference", "count" ] - }, - "ReadMemoryResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'readMemory' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "address": { - "type": "string", - "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with '0x', or as a decimal value otherwise." - }, - "unreadableBytes": { - "type": "integer", - "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." - }, - "data": { - "type": "string", - "description": "The bytes read from memory, encoded using base64." - } - }, - "required": [ "address" ] - } - } - }] - }, - - "DisassembleRequest": { - "allOf": [ { "$ref": "#/definitions/Request" }, { - "type": "object", - "description": "Disassembles code stored at the provided location.\nClients should only call this request if the capability 'supportsDisassembleRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ "disassemble" ] - }, - "arguments": { - "$ref": "#/definitions/DisassembleArguments" - } - }, - "required": [ "command", "arguments" ] - }] - }, - "DisassembleArguments": { - "type": "object", - "description": "Arguments for 'disassemble' request.", - "properties": { - "memoryReference": { - "type": "string", - "description": "Memory reference to the base location containing the instructions to disassemble." - }, - "offset": { - "type": "integer", - "description": "Optional offset (in bytes) to be applied to the reference location before disassembling. Can be negative." - }, - "instructionOffset": { - "type": "integer", - "description": "Optional offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative." - }, - "instructionCount": { - "type": "integer", - "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." - }, - "resolveSymbols": { - "type": "boolean", - "description": "If true, the adapter should attempt to resolve memory addresses and other values to symbolic names." - } - }, - "required": [ "memoryReference", "instructionCount" ] - }, - "DisassembleResponse": { - "allOf": [ { "$ref": "#/definitions/Response" }, { - "type": "object", - "description": "Response to 'disassemble' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "instructions": { - "type": "array", - "items": { - "$ref": "#/definitions/DisassembledInstruction" - }, - "description": "The list of disassembled instructions." - } - }, - "required": [ "instructions" ] - } - } - }] - }, - - "Capabilities": { - "type": "object", - "title": "Types", - "description": "Information about the capabilities of a debug adapter.", - "properties": { - "supportsConfigurationDoneRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'configurationDone' request." - }, - "supportsFunctionBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports function breakpoints." - }, - "supportsConditionalBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports conditional breakpoints." - }, - "supportsHitConditionalBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports breakpoints that break execution after a specified number of hits." - }, - "supportsEvaluateForHovers": { - "type": "boolean", - "description": "The debug adapter supports a (side effect free) evaluate request for data hovers." - }, - "exceptionBreakpointFilters": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionBreakpointsFilter" - }, - "description": "Available exception filter options for the 'setExceptionBreakpoints' request." - }, - "supportsStepBack": { - "type": "boolean", - "description": "The debug adapter supports stepping back via the 'stepBack' and 'reverseContinue' requests." - }, - "supportsSetVariable": { - "type": "boolean", - "description": "The debug adapter supports setting a variable to a value." - }, - "supportsRestartFrame": { - "type": "boolean", - "description": "The debug adapter supports restarting a frame." - }, - "supportsGotoTargetsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'gotoTargets' request." - }, - "supportsStepInTargetsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'stepInTargets' request." - }, - "supportsCompletionsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'completions' request." - }, - "completionTriggerCharacters": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the '.' character." - }, - "supportsModulesRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'modules' request." - }, - "additionalModuleColumns": { - "type": "array", - "items": { - "$ref": "#/definitions/ColumnDescriptor" - }, - "description": "The set of additional module information exposed by the debug adapter." - }, - "supportedChecksumAlgorithms": { - "type": "array", - "items": { - "$ref": "#/definitions/ChecksumAlgorithm" - }, - "description": "Checksum algorithms supported by the debug adapter." - }, - "supportsRestartRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'restart' request. In this case a client should not implement 'restart' by terminating and relaunching the adapter but by calling the RestartRequest." - }, - "supportsExceptionOptions": { - "type": "boolean", - "description": "The debug adapter supports 'exceptionOptions' on the setExceptionBreakpoints request." - }, - "supportsValueFormattingOptions": { - "type": "boolean", - "description": "The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest." - }, - "supportsExceptionInfoRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'exceptionInfo' request." - }, - "supportTerminateDebuggee": { - "type": "boolean", - "description": "The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request." - }, - "supportSuspendDebuggee": { - "type": "boolean", - "description": "The debug adapter supports the 'suspendDebuggee' attribute on the 'disconnect' request." - }, - "supportsDelayedStackTraceLoading": { - "type": "boolean", - "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported." - }, - "supportsLoadedSourcesRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'loadedSources' request." - }, - "supportsLogPoints": { - "type": "boolean", - "description": "The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint." - }, - "supportsTerminateThreadsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'terminateThreads' request." - }, - "supportsSetExpression": { - "type": "boolean", - "description": "The debug adapter supports the 'setExpression' request." - }, - "supportsTerminateRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'terminate' request." - }, - "supportsDataBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports data breakpoints." - }, - "supportsReadMemoryRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'readMemory' request." - }, - "supportsDisassembleRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'disassemble' request." - }, - "supportsCancelRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'cancel' request." - }, - "supportsBreakpointLocationsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'breakpointLocations' request." - }, - "supportsClipboardContext": { - "type": "boolean", - "description": "The debug adapter supports the 'clipboard' context value in the 'evaluate' request." - }, - "supportsSteppingGranularity": { - "type": "boolean", - "description": "The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests." - }, - "supportsInstructionBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports adding breakpoints based on instruction references." - }, - "supportsExceptionFilterOptions": { - "type": "boolean", - "description": "The debug adapter supports 'filterOptions' as an argument on the 'setExceptionBreakpoints' request." - } - } - }, - - "ExceptionBreakpointsFilter": { - "type": "object", - "description": "An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions are dealt with.", - "properties": { - "filter": { - "type": "string", - "description": "The internal ID of the filter option. This value is passed to the 'setExceptionBreakpoints' request." - }, - "label": { - "type": "string", - "description": "The name of the filter option. This will be shown in the UI." - }, - "description": { - "type": "string", - "description": "An optional help text providing additional information about the exception filter. This string is typically shown as a hover and must be translated." - }, - "default": { - "type": "boolean", - "description": "Initial value of the filter option. If not specified a value 'false' is assumed." - }, - "supportsCondition": { - "type": "boolean", - "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." - }, - "conditionDescription": { - "type": "string", - "description": "An optional help text providing information about the condition. This string is shown as the placeholder text for a text box and must be translated." - } - }, - "required": [ "filter", "label" ] - }, - - "Message": { - "type": "object", - "description": "A structured message object. Used to return errors from requests.", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for the message." - }, - "format": { - "type": "string", - "description": "A format string for the message. Embedded variables have the form '{name}'.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes." - }, - "variables": { - "type": "object", - "description": "An object used as a dictionary for looking up the variables in the format string.", - "additionalProperties": { - "type": "string", - "description": "Values must be strings." - } - }, - "sendTelemetry": { - "type": "boolean", - "description": "If true send to telemetry." - }, - "showUser": { - "type": "boolean", - "description": "If true show user." - }, - "url": { - "type": "string", - "description": "An optional url where additional information about this message can be found." - }, - "urlLabel": { - "type": "string", - "description": "An optional label that is presented to the user as the UI for opening the url." - } - }, - "required": [ "id", "format" ] - }, - - "Module": { - "type": "object", - "description": "A Module object represents a row in the modules view.\nTwo attributes are mandatory: an id identifies a module in the modules view and is used in a ModuleEvent for identifying a module for adding, updating or deleting.\nThe name is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They will show up in the module View if they have a corresponding ColumnDescriptor.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names\nwe recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.", - "properties": { - "id": { - "type": ["integer", "string"], - "description": "Unique identifier for the module." - }, - "name": { - "type": "string", - "description": "A name of the module." - }, - "path": { - "type": "string", - "description": "optional but recommended attributes.\nalways try to use these first before introducing additional attributes.\n\nLogical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module." - }, - "isOptimized": { - "type": "boolean", - "description": "True if the module is optimized." - }, - "isUserCode": { - "type": "boolean", - "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'." - }, - "version": { - "type": "string", - "description": "Version of Module." - }, - "symbolStatus": { - "type": "string", - "description": "User understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc." - }, - "symbolFilePath": { - "type": "string", - "description": "Logical full path to the symbol file. The exact definition is implementation defined." - }, - "dateTimeStamp": { - "type": "string", - "description": "Module created or modified." - }, - "addressRange": { - "type": "string", - "description": "Address range covered by this module." - } - }, - "required": [ "id", "name" ] - }, - - "ColumnDescriptor": { - "type": "object", - "description": "A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", - "properties": { - "attributeName": { - "type": "string", - "description": "Name of the attribute rendered in this column." - }, - "label": { - "type": "string", - "description": "Header UI label of column." - }, - "format": { - "type": "string", - "description": "Format to use for the rendered values in this column. TBD how the format strings looks like." - }, - "type": { - "type": "string", - "enum": [ "string", "number", "boolean", "unixTimestampUTC" ], - "description": "Datatype of values in this column. Defaults to 'string' if not specified." - }, - "width": { - "type": "integer", - "description": "Width of this column in characters (hint only)." - } - }, - "required": [ "attributeName", "label"] - }, - - "ModulesViewDescriptor": { - "type": "object", - "description": "The ModulesViewDescriptor is the container for all declarative configuration options of a ModuleView.\nFor now it only specifies the columns to be shown in the modules view.", - "properties": { - "columns": { - "type": "array", - "items": { - "$ref": "#/definitions/ColumnDescriptor" - } - } - }, - "required": [ "columns" ] - }, - - "Thread": { - "type": "object", - "description": "A Thread", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for the thread." - }, - "name": { - "type": "string", - "description": "A name of the thread." - } - }, - "required": [ "id", "name" ] - }, - - "Source": { - "type": "object", - "description": "A Source is a descriptor for source code.\nIt is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.", - "properties": { - "name": { - "type": "string", - "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." - }, - "path": { - "type": "string", - "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0)." - }, - "sourceReference": { - "type": "integer", - "description": "If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified).\nA sourceReference is only valid for a session, so it must not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "presentationHint": { - "type": "string", - "description": "An optional hint for how to present the source in the UI.\nA value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.", - "enum": [ "normal", "emphasize", "deemphasize" ] - }, - "origin": { - "type": "string", - "description": "The (optional) origin of this source: possible values 'internal module', 'inlined content from source map', etc." - }, - "sources": { - "type": "array", - "items": { - "$ref": "#/definitions/Source" - }, - "description": "An optional list of sources that are related to this source. These may be the source that generated this source." - }, - "adapterData": { - "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], - "description": "Optional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." - }, - "checksums": { - "type": "array", - "items": { - "$ref": "#/definitions/Checksum" - }, - "description": "The checksums associated with this file." - } - } - }, - - "StackFrame": { - "type": "object", - "description": "A Stackframe contains the source location.", - "properties": { - "id": { - "type": "integer", - "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe." - }, - "name": { - "type": "string", - "description": "The name of the stack frame, typically a method name." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The optional source of the frame." - }, - "line": { - "type": "integer", - "description": "The line within the file of the frame. If source is null or doesn't exist, line is 0 and must be ignored." - }, - "column": { - "type": "integer", - "description": "The column within the line. If source is null or doesn't exist, column is 0 and must be ignored." - }, - "endLine": { - "type": "integer", - "description": "An optional end line of the range covered by the stack frame." - }, - "endColumn": { - "type": "integer", - "description": "An optional end column of the range covered by the stack frame." - }, - "canRestart": { - "type": "boolean", - "description": "Indicates whether this frame can be restarted with the 'restart' request. Clients should only use this if the debug adapter supports the 'restart' request (capability 'supportsRestartRequest' is true)." - }, - "instructionPointerReference": { - "type": "string", - "description": "Optional memory reference for the current instruction pointer in this frame." - }, - "moduleId": { - "type": ["integer", "string"], - "description": "The module associated with this frame, if any." - }, - "presentationHint": { - "type": "string", - "enum": [ "normal", "label", "subtle" ], - "description": "An optional hint for how to present this frame in the UI.\nA value of 'label' can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of 'subtle' can be used to change the appearance of a frame in a 'subtle' way." - } - }, - "required": [ "id", "name", "line", "column" ] - }, - - "Scope": { - "type": "object", - "description": "A Scope is a named container for variables. Optionally a scope can map to a source or a range within a source.", - "properties": { - "name": { - "type": "string", - "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated." - }, - "presentationHint": { - "type": "string", - "description": "An optional hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", - "_enum": [ "arguments", "locals", "registers" ], - "enumDescriptions": [ - "Scope contains method arguments.", - "Scope contains local variables.", - "Scope contains registers. Only a single 'registers' scope should be returned from a 'scopes' request." - ] - }, - "variablesReference": { - "type": "integer", - "description": "The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named variables in this scope.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed variables in this scope.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks." - }, - "expensive": { - "type": "boolean", - "description": "If true, the number of variables in this scope is large or expensive to retrieve." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "Optional source for this scope." - }, - "line": { - "type": "integer", - "description": "Optional start line of the range covered by this scope." - }, - "column": { - "type": "integer", - "description": "Optional start column of the range covered by this scope." - }, - "endLine": { - "type": "integer", - "description": "Optional end line of the range covered by this scope." - }, - "endColumn": { - "type": "integer", - "description": "Optional end column of the range covered by this scope." - } - }, - "required": [ "name", "variablesReference", "expensive" ] - }, - - "Variable": { - "type": "object", - "description": "A Variable is a name/value pair.\nOptionally a variable can have a 'type' that is shown if space permits or when hovering over the variable's name.\nAn optional 'kind' is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the VariablesRequest.\nIf the number of named or indexed children is large, the numbers should be returned via the optional 'namedVariables' and 'indexedVariables' attributes.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks.", - "properties": { - "name": { - "type": "string", - "description": "The variable's name." - }, - "value": { - "type": "string", - "description": "The variable's value. This can be a multi-line text, e.g. for a function the body of a function." - }, - "type": { - "type": "string", - "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." - }, - "presentationHint": { - "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of a variable that can be used to determine how to render the variable in the UI." - }, - "evaluateName": { - "type": "string", - "description": "Optional evaluatable name of this variable which can be passed to the 'EvaluateRequest' to fetch the variable's value." - }, - "variablesReference": { - "type": "integer", - "description": "If variablesReference is > 0, the variable is structured and its children can be retrieved by passing variablesReference to the VariablesRequest." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks." - }, - "memoryReference": { - "type": "string", - "description": "Optional memory reference for the variable if the variable represents executable code, such as a function pointer.\nThis attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." - } - }, - "required": [ "name", "value", "variablesReference" ] - }, - - "VariablePresentationHint": { - "type": "object", - "description": "Optional properties of a variable that can be used to determine how to render the variable in the UI.", - "properties": { - "kind": { - "description": "The kind of variable. Before introducing additional values, try to use the listed values.", - "type": "string", - "_enum": [ "property", "method", "class", "data", "event", "baseClass", "innerClass", "interface", "mostDerivedClass", "virtual", "dataBreakpoint" ], - "enumDescriptions": [ - "Indicates that the object is a property.", - "Indicates that the object is a method.", - "Indicates that the object is a class.", - "Indicates that the object is data.", - "Indicates that the object is an event.", - "Indicates that the object is a base class.", - "Indicates that the object is an inner class.", - "Indicates that the object is an interface.", - "Indicates that the object is the most derived class.", - "Indicates that the object is virtual, that means it is a synthetic object introducedby the\nadapter for rendering purposes, e.g. an index range for large arrays.", - "Deprecated: Indicates that a data breakpoint is registered for the object. The 'hasDataBreakpoint' attribute should generally be used instead." - ] - }, - "attributes": { - "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", - "type": "array", - "items": { - "type": "string", - "_enum": [ "static", "constant", "readOnly", "rawString", "hasObjectId", "canHaveObjectId", "hasSideEffects", "hasDataBreakpoint" ], - "enumDescriptions": [ - "Indicates that the object is static.", - "Indicates that the object is a constant.", - "Indicates that the object is read only.", - "Indicates that the object is a raw string.", - "Indicates that the object can have an Object ID created for it.", - "Indicates that the object has an Object ID associated with it.", - "Indicates that the evaluation had side effects.", - "Indicates that the object has its value tracked by a data breakpoint." - ] - } - }, - "visibility": { - "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", - "type": "string", - "_enum": [ "public", "private", "protected", "internal", "final" ] - } - } - }, - - "BreakpointLocation": { - "type": "object", - "description": "Properties of a breakpoint location returned from the 'breakpointLocations' request.", - "properties": { - "line": { - "type": "integer", - "description": "Start line of breakpoint location." - }, - "column": { - "type": "integer", - "description": "Optional start column of breakpoint location." - }, - "endLine": { - "type": "integer", - "description": "Optional end line of breakpoint location if the location covers a range." - }, - "endColumn": { - "type": "integer", - "description": "Optional end column of breakpoint location if the location covers a range." - } - }, - "required": [ "line" ] - }, - - "SourceBreakpoint": { - "type": "object", - "description": "Properties of a breakpoint or logpoint passed to the setBreakpoints request.", - "properties": { - "line": { - "type": "integer", - "description": "The source line of the breakpoint or logpoint." - }, - "column": { - "type": "integer", - "description": "An optional source column of the breakpoint." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." - }, - "hitCondition": { - "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." - }, - "logMessage": { - "type": "string", - "description": "If this attribute exists and is non-empty, the backend must not 'break' (stop)\nbut log the message instead. Expressions within {} are interpolated.\nThe attribute is only honored by a debug adapter if the capability 'supportsLogPoints' is true." - } - }, - "required": [ "line" ] - }, - - "FunctionBreakpoint": { - "type": "object", - "description": "Properties of a breakpoint passed to the setFunctionBreakpoints request.", - "properties": { - "name": { - "type": "string", - "description": "The name of the function." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." - }, - "hitCondition": { - "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." - } - }, - "required": [ "name" ] - }, - - "DataBreakpointAccessType": { - "type": "string", - "description": "This enumeration defines all possible access types for data breakpoints.", - "enum": [ "read", "write", "readWrite" ] - }, - - "DataBreakpoint": { - "type": "object", - "description": "Properties of a data breakpoint passed to the setDataBreakpoints request.", - "properties": { - "dataId": { - "type": "string", - "description": "An id representing the data. This id is returned from the dataBreakpointInfo request." - }, - "accessType": { - "$ref": "#/definitions/DataBreakpointAccessType", - "description": "The access type of the data." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional breakpoints." - }, - "hitCondition": { - "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed." - } - }, - "required": [ "dataId" ] - }, - - "InstructionBreakpoint": { - "type": "object", - "description": "Properties of a breakpoint passed to the setInstructionBreakpoints request", - "properties": { - "instructionReference": { - "type": "string", - "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an EvaluateResponse, Variable, StackFrame, GotoTarget, or Breakpoint." - }, - "offset": { - "type": "integer", - "description": "An optional offset from the instruction reference.\nThis can be negative." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." - }, - "hitCondition": { - "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." - } - }, - "required": [ "instructionReference" ] - }, - - "Breakpoint": { - "type": "object", - "description": "Information about a Breakpoint created in setBreakpoints, setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints.", - "properties": { - "id": { - "type": "integer", - "description": "An optional identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints." - }, - "verified": { - "type": "boolean", - "description": "If true breakpoint could be set (but not necessarily at the desired location)." - }, - "message": { - "type": "string", - "description": "An optional message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The source where the breakpoint is located." - }, - "line": { - "type": "integer", - "description": "The start line of the actual range covered by the breakpoint." - }, - "column": { - "type": "integer", - "description": "An optional start column of the actual range covered by the breakpoint." - }, - "endLine": { - "type": "integer", - "description": "An optional end line of the actual range covered by the breakpoint." - }, - "endColumn": { - "type": "integer", - "description": "An optional end column of the actual range covered by the breakpoint.\nIf no end line is given, then the end column is assumed to be in the start line." - }, - "instructionReference": { - "type": "string", - "description": "An optional memory reference to where the breakpoint is set." - }, - "offset": { - "type": "integer", - "description": "An optional offset from the instruction reference.\nThis can be negative." - } - }, - "required": [ "verified" ] - }, - - "SteppingGranularity": { - "type": "string", - "description": "The granularity of one 'step' in the stepping requests 'next', 'stepIn', 'stepOut', and 'stepBack'.", - "enum": [ "statement", "line", "instruction" ], - "enumDescriptions": [ - "The step should allow the program to run until the current statement has finished executing.\nThe meaning of a statement is determined by the adapter and it may be considered equivalent to a line.\nFor example 'for(int i = 0; i < 10; i++) could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.", - "The step should allow the program to run until the current source line has executed.", - "The step should allow one instruction to execute (e.g. one x86 instruction)." - ] - }, - - "StepInTarget": { - "type": "object", - "description": "A StepInTarget can be used in the 'stepIn' request and determines into which single target the stepIn request should step.", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for a stepIn target." - }, - "label": { - "type": "string", - "description": "The name of the stepIn target (shown in the UI)." - } - }, - "required": [ "id", "label" ] - }, - - "GotoTarget": { - "type": "object", - "description": "A GotoTarget describes a code location that can be used as a target in the 'goto' request.\nThe possible goto targets can be determined via the 'gotoTargets' request.", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for a goto target. This is used in the goto request." - }, - "label": { - "type": "string", - "description": "The name of the goto target (shown in the UI)." - }, - "line": { - "type": "integer", - "description": "The line of the goto target." - }, - "column": { - "type": "integer", - "description": "An optional column of the goto target." - }, - "endLine": { - "type": "integer", - "description": "An optional end line of the range covered by the goto target." - }, - "endColumn": { - "type": "integer", - "description": "An optional end column of the range covered by the goto target." - }, - "instructionPointerReference": { - "type": "string", - "description": "Optional memory reference for the instruction pointer value represented by this target." - } - }, - "required": [ "id", "label", "line" ] - }, - - "CompletionItem": { - "type": "object", - "description": "CompletionItems are the suggestions returned from the CompletionsRequest.", - "properties": { - "label": { - "type": "string", - "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion." - }, - "text": { - "type": "string", - "description": "If text is not falsy then it is inserted instead of the label." - }, - "sortText": { - "type": "string", - "description": "A string that should be used when comparing this item with other items. When `falsy` the label is used." - }, - "type": { - "$ref": "#/definitions/CompletionItemType", - "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon." - }, - "start": { - "type": "integer", - "description": "This value determines the location (in the CompletionsRequest's 'text' attribute) where the completion text is added.\nIf missing the text is added at the location specified by the CompletionsRequest's 'column' attribute." - }, - "length": { - "type": "integer", - "description": "This value determines how many characters are overwritten by the completion text.\nIf missing the value 0 is assumed which results in the completion text being inserted." - }, - "selectionStart": { - "type": "integer", - "description": "Determines the start of the new selection after the text has been inserted (or replaced).\nThe start position must in the range 0 and length of the completion text.\nIf omitted the selection starts at the end of the completion text." - }, - "selectionLength": { - "type": "integer", - "description": "Determines the length of the new selection after the text has been inserted (or replaced).\nThe selection can not extend beyond the bounds of the completion text.\nIf omitted the length is assumed to be 0." - } - }, - "required": [ "label" ] - }, - - "CompletionItemType": { - "type": "string", - "description": "Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.", - "enum": [ "method", "function", "constructor", "field", "variable", "class", "interface", "module", "property", "unit", "value", "enum", "keyword", "snippet", "text", "color", "file", "reference", "customcolor" ] - }, - - "ChecksumAlgorithm": { - "type": "string", - "description": "Names of checksum algorithms that may be supported by a debug adapter.", - "enum": [ "MD5", "SHA1", "SHA256", "timestamp" ] - }, - - "Checksum": { - "type": "object", - "description": "The checksum of an item calculated by the specified algorithm.", - "properties": { - "algorithm": { - "$ref": "#/definitions/ChecksumAlgorithm", - "description": "The algorithm used to calculate this checksum." - }, - "checksum": { - "type": "string", - "description": "Value of the checksum." - } - }, - "required": [ "algorithm", "checksum" ] - }, - - "ValueFormat": { - "type": "object", - "description": "Provides formatting information for a value.", - "properties": { - "hex": { - "type": "boolean", - "description": "Display the value in hex." - } - } - }, - - "StackFrameFormat": { - "allOf": [ { "$ref": "#/definitions/ValueFormat" }, { - "type": "object", - "description": "Provides formatting information for a stack frame.", - "properties": { - "parameters": { - "type": "boolean", - "description": "Displays parameters for the stack frame." - }, - "parameterTypes": { - "type": "boolean", - "description": "Displays the types of parameters for the stack frame." - }, - "parameterNames": { - "type": "boolean", - "description": "Displays the names of parameters for the stack frame." - }, - "parameterValues": { - "type": "boolean", - "description": "Displays the values of parameters for the stack frame." - }, - "line": { - "type": "boolean", - "description": "Displays the line number of the stack frame." - }, - "module": { - "type": "boolean", - "description": "Displays the module of the stack frame." - }, - "includeAll": { - "type": "boolean", - "description": "Includes all stack frames, including those the debug adapter might otherwise hide." - } - } - }] - }, - - "ExceptionFilterOptions": { - "type": "object", - "description": "An ExceptionFilterOptions is used to specify an exception filter together with a condition for the setExceptionsFilter request.", - "properties": { - "filterId": { - "type": "string", - "description": "ID of an exception filter returned by the 'exceptionBreakpointFilters' capability." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional exceptions.\nThe exception will break into the debugger if the result of the condition is true." - } - }, - "required": [ "filterId" ] - }, - - "ExceptionOptions": { - "type": "object", - "description": "An ExceptionOptions assigns configuration options to a set of exceptions.", - "properties": { - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionPathSegment" - }, - "description": "A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." - }, - "breakMode": { - "$ref": "#/definitions/ExceptionBreakMode", - "description": "Condition when a thrown exception should result in a break." - } - }, - "required": [ "breakMode" ] - }, - - "ExceptionBreakMode": { - "type": "string", - "description": "This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.", - "enum": [ "never", "always", "unhandled", "userUnhandled" ] - }, - - "ExceptionPathSegment": { - "type": "object", - "description": "An ExceptionPathSegment represents a segment in a path that is used to match leaves or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if 'negate' is false or missing or\nit matches anything except the names provided if 'negate' is true.", - "properties": { - "negate": { - "type": "boolean", - "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided." - }, - "names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Depending on the value of 'negate' the names that should match or not match." - } - }, - "required": [ "names" ] - }, - - "ExceptionDetails": { - "type": "object", - "description": "Detailed information about an exception that has occurred.", - "properties": { - "message": { - "type": "string", - "description": "Message contained in the exception." - }, - "typeName": { - "type": "string", - "description": "Short type name of the exception object." - }, - "fullTypeName": { - "type": "string", - "description": "Fully-qualified type name of the exception object." - }, - "evaluateName": { - "type": "string", - "description": "Optional expression that can be evaluated in the current scope to obtain the exception object." - }, - "stackTrace": { - "type": "string", - "description": "Stack trace at the time the exception was thrown." - }, - "innerException": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionDetails" - }, - "description": "Details of the exception contained by this exception, if any." - } - } - }, - - "DisassembledInstruction": { - "type": "object", - "description": "Represents a single disassembled instruction.", - "properties": { - "address": { - "type": "string", - "description": "The address of the instruction. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise." - }, - "instructionBytes": { - "type": "string", - "description": "Optional raw bytes representing the instruction and its operands, in an implementation-defined format." - }, - "instruction": { - "type": "string", - "description": "Text representing the instruction and its operands, in an implementation-defined format." - }, - "symbol": { - "type": "string", - "description": "Name of the symbol that corresponds with the location of this instruction, if any." - }, - "location": { - "$ref": "#/definitions/Source", - "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction." - }, - "line": { - "type": "integer", - "description": "The line within the source location that corresponds to this instruction, if any." - }, - "column": { - "type": "integer", - "description": "The column within the line that corresponds to this instruction, if any." - }, - "endLine": { - "type": "integer", - "description": "The end line of the range that corresponds to this instruction, if any." - }, - "endColumn": { - "type": "integer", - "description": "The end column of the range that corresponds to this instruction, if any." - } - }, - "required": [ "address", "instruction" ] - }, - - "InvalidatedAreas": { - "type": "string", - "description": "Logical areas that can be invalidated by the 'invalidated' event.", - "_enum": [ "all", "stacks", "threads", "variables" ], - "enumDescriptions": [ - "All previously fetched data has become invalid and needs to be refetched.", - "Previously fetched stack related data has become invalid and needs to be refetched.", - "Previously fetched thread related data has become invalid and needs to be refetched.", - "Previously fetched variable data has become invalid and needs to be refetched." - ] - } - - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Debug Adapter Protocol", + "description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.", + "type": "object", + "definitions": { + "ProtocolMessage": { + "type": "object", + "title": "Base Protocol", + "description": "Base class of requests, responses, and events.", + "properties": { + "seq": { + "type": "integer", + "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." + }, + "type": { + "type": "string", + "description": "Message type.", + "_enum": [ + "request", + "response", + "event" + ] + } + }, + "required": [ + "seq", + "type" + ] + }, + "Request": { + "allOf": [ + { + "$ref": "#/definitions/ProtocolMessage" + }, + { + "type": "object", + "description": "A client or debug adapter initiated request.", + "properties": { + "type": { + "type": "string", + "enum": [ + "request" + ] + }, + "command": { + "type": "string", + "description": "The command to execute." + }, + "arguments": { + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Object containing arguments for the command." + } + }, + "required": [ + "type", + "command" + ] + } + ] + }, + "Event": { + "allOf": [ + { + "$ref": "#/definitions/ProtocolMessage" + }, + { + "type": "object", + "description": "A debug adapter initiated event.", + "properties": { + "type": { + "type": "string", + "enum": [ + "event" + ] + }, + "event": { + "type": "string", + "description": "Type of event." + }, + "body": { + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Event-specific information." + } + }, + "required": [ + "type", + "event" + ] + } + ] + }, + "Response": { + "allOf": [ + { + "$ref": "#/definitions/ProtocolMessage" + }, + { + "type": "object", + "description": "Response for a request.", + "properties": { + "type": { + "type": "string", + "enum": [ + "response" + ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." + }, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf true, the request was successful and the 'body' attribute may contain the result of the request.\nIf the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error')." + }, + "command": { + "type": "string", + "description": "The command requested." + }, + "message": { + "type": "string", + "description": "Contains the raw error in short form if 'success' is false.\nThis raw error might be interpreted by the frontend and is not shown in the UI.\nSome predefined values exist.", + "_enum": [ + "cancelled" + ], + "enumDescriptions": [ + "request was cancelled." + ] + }, + "body": { + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Contains request result if success is true and optional error details if success is false." + } + }, + "required": [ + "type", + "request_seq", + "success", + "command" + ] + } + ] + }, + "ErrorResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "On error (whenever 'success' is false), the body can provide more details.", + "properties": { + "body": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Message", + "description": "An optional, structured error message." + } + } + } + }, + "required": [ + "body" + ] + } + ] + }, + "CancelRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The 'cancel' request is used by the frontend in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence. Clients should only call this request if the capability 'supportsCancelRequest' is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honouring this request but there are no guarantees.\nThe 'cancel' request may return an error if it could not cancel an operation but a frontend should refrain from presenting this error to end users.\nA frontend client should only call this request if the capability 'supportsCancelRequest' is true.\nThe request that got canceled still needs to send a response back. This can either be a normal result ('success' attribute true)\nor an error response ('success' attribute false and the 'message' set to 'cancelled').\nReturning partial results from a cancelled request is possible but please note that a frontend client has no generic way for detecting that a response is partial or not.\n The progress that got cancelled still needs to send a 'progressEnd' event back.\n A client should not assume that progress just got cancelled after sending the 'cancel' request.", + "properties": { + "command": { + "type": "string", + "enum": [ + "cancel" + ] + }, + "arguments": { + "$ref": "#/definitions/CancelArguments" + } + }, + "required": [ + "command" + ] + } + ] + }, + "CancelArguments": { + "type": "object", + "description": "Arguments for 'cancel' request.", + "properties": { + "requestId": { + "type": "integer", + "description": "The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.\nBoth a 'requestId' and a 'progressId' can be specified in one request." + }, + "progressId": { + "type": "string", + "description": "The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.\nBoth a 'requestId' and a 'progressId' can be specified in one request." + } + } + }, + "CancelResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'cancel' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "InitializedEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "title": "Events", + "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. SetBreakpointsRequest, SetExceptionBreakpointsRequest).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the 'initialize' request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends 'initialized' event (after the 'initialize' request has returned)\n- frontend sends zero or more 'setBreakpoints' requests\n- frontend sends one 'setFunctionBreakpoints' request (if capability 'supportsFunctionBreakpoints' is true)\n- frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false)\n- frontend sends other future configuration requests\n- frontend sends one 'configurationDone' request to indicate the end of the configuration.", + "properties": { + "event": { + "type": "string", + "enum": [ + "initialized" + ] + } + }, + "required": [ + "event" + ] + } + ] + }, + "StoppedEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a break point previously set, a stepping request has completed, by executing a debugger statement etc.", + "properties": { + "event": { + "type": "string", + "enum": [ + "stopped" + ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the 'description' attribute is missing (but it must not be translated).", + "_enum": [ + "step", + "breakpoint", + "exception", + "pause", + "entry", + "goto", + "function breakpoint", + "data breakpoint", + "instruction breakpoint" + ] + }, + "description": { + "type": "string", + "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and must be translated." + }, + "threadId": { + "type": "integer", + "description": "The thread which was stopped." + }, + "preserveFocusHint": { + "type": "boolean", + "description": "A value of true hints to the frontend that this event should not change the focus." + }, + "text": { + "type": "string", + "description": "Additional information. E.g. if reason is 'exception', text contains the exception name. This string is shown in the UI." + }, + "allThreadsStopped": { + "type": "boolean", + "description": "If 'allThreadsStopped' is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given threadId can be expanded." + }, + "hitBreakpointIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Ids of the breakpoints that triggered the event. In most cases there will be only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." + } + }, + "required": [ + "reason" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "ContinuedEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that the execution of the debuggee has continued.\nPlease note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. 'launch' or 'continue'.\nIt is only necessary to send a 'continued' event if there was no previous request that implied this.", + "properties": { + "event": { + "type": "string", + "enum": [ + "continued" + ] + }, + "body": { + "type": "object", + "properties": { + "threadId": { + "type": "integer", + "description": "The thread which was continued." + }, + "allThreadsContinued": { + "type": "boolean", + "description": "If 'allThreadsContinued' is true, a debug adapter can announce that all threads have continued." + } + }, + "required": [ + "threadId" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "ExitedEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that the debuggee has exited and returns its exit code.", + "properties": { + "event": { + "type": "string", + "enum": [ + "exited" + ] + }, + "body": { + "type": "object", + "properties": { + "exitCode": { + "type": "integer", + "description": "The exit code returned from the debuggee." + } + }, + "required": [ + "exitCode" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "TerminatedEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.", + "properties": { + "event": { + "type": "string", + "enum": [ + "terminated" + ] + }, + "body": { + "type": "object", + "properties": { + "restart": { + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests." + } + } + } + }, + "required": [ + "event" + ] + } + ] + }, + "ThreadEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that a thread has started or exited.", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread" + ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ + "started", + "exited" + ] + }, + "threadId": { + "type": "integer", + "description": "The identifier of the thread." + } + }, + "required": [ + "reason", + "threadId" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "OutputEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that the target has produced some output.", + "properties": { + "event": { + "type": "string", + "enum": [ + "output" + ] + }, + "body": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "The output category. If not specified, 'console' is assumed.", + "_enum": [ + "console", + "stdout", + "stderr", + "telemetry" + ] + }, + "output": { + "type": "string", + "description": "The output to report." + }, + "group": { + "type": "string", + "description": "Support for keeping an output log organized by grouping related messages.", + "enum": [ + "start", + "startCollapsed", + "end" + ], + "enumDescriptions": [ + "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe 'output' attribute becomes the name of the group and is not indented.", + "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe 'output' attribute becomes the name of the group and is not indented.", + "End the current group and decreases the indentation of subsequent output events.\nA non empty 'output' attribute is shown as the unindented end of the group." + ] + }, + "variablesReference": { + "type": "integer", + "description": "If an attribute 'variablesReference' exists and its value is > 0, the output contains objects which can be retrieved by passing 'variablesReference' to the 'variables' request. The value should be less than or equal to 2147483647 (2^31-1)." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "An optional source location where the output was produced." + }, + "line": { + "type": "integer", + "description": "An optional source location line where the output was produced." + }, + "column": { + "type": "integer", + "description": "An optional source location column where the output was produced." + }, + "data": { + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Optional data to report. For the 'telemetry' category the data will be sent to telemetry, for the other categories the data is shown in JSON format." + } + }, + "required": [ + "output" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "BreakpointEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that some information about a breakpoint has changed.", + "properties": { + "event": { + "type": "string", + "enum": [ + "breakpoint" + ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ + "changed", + "new", + "removed" + ] + }, + "breakpoint": { + "$ref": "#/definitions/Breakpoint", + "description": "The 'id' attribute is used to find the target breakpoint and the other attributes are used as the new values." + } + }, + "required": [ + "reason", + "breakpoint" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "ModuleEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that some information about a module has changed.", + "properties": { + "event": { + "type": "string", + "enum": [ + "module" + ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ + "new", + "changed", + "removed" + ] + }, + "module": { + "$ref": "#/definitions/Module", + "description": "The new, changed, or removed module. In case of 'removed' only the module id is used." + } + }, + "required": [ + "reason", + "module" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "LoadedSourceEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.", + "properties": { + "event": { + "type": "string", + "enum": [ + "loadedSource" + ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ + "new", + "changed", + "removed" + ] + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The new, changed, or removed source." + } + }, + "required": [ + "reason", + "source" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "ProcessEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.", + "properties": { + "event": { + "type": "string", + "enum": [ + "process" + ] + }, + "body": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." + }, + "systemProcessId": { + "type": "integer", + "description": "The system process id of the debugged process. This property will be missing for non-system processes." + }, + "isLocalProcess": { + "type": "boolean", + "description": "If true, the process is running on the same computer as the debug adapter." + }, + "startMethod": { + "type": "string", + "enum": [ + "launch", + "attach", + "attachForSuspendedLaunch" + ], + "description": "Describes how the debug engine started debugging this process.", + "enumDescriptions": [ + "Process was launched under the debugger.", + "Debugger attached to an existing process.", + "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." + ] + }, + "pointerSize": { + "type": "integer", + "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "CapabilitiesEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the frontend and its UI, it might not be possible to change that at random times (or too late).\nConsequently this event has a hint characteristic: a frontend can only be expected to make a 'best effort' in honouring individual capabilities but there are no guarantees.\nOnly changed capabilities need to be included, all other capabilities keep their values.", + "properties": { + "event": { + "type": "string", + "enum": [ + "capabilities" + ] + }, + "body": { + "type": "object", + "properties": { + "capabilities": { + "$ref": "#/definitions/Capabilities", + "description": "The set of updated capabilities." + } + }, + "required": [ + "capabilities" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "ProgressStartEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event signals that a long running operation is about to start and\nprovides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ + "progressStart" + ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "An ID that must be used in subsequent 'progressUpdate' and 'progressEnd' events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." + }, + "title": { + "type": "string", + "description": "Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation." + }, + "requestId": { + "type": "integer", + "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit\nprogress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." + }, + "cancellable": { + "type": "boolean", + "description": "If true, the request that reports progress may be canceled with a 'cancel' request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." + }, + "message": { + "type": "string", + "description": "Optional, more detailed progress message." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + }, + "required": [ + "progressId", + "title" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "ProgressUpdateEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event signals that the progress reporting needs to updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ + "progressUpdate" + ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial 'progressStart' event." + }, + "message": { + "type": "string", + "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + }, + "required": [ + "progressId" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "ProgressEndEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "The event signals the end of the progress reporting with an optional final message.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ + "progressEnd" + ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial 'ProgressStartEvent'." + }, + "message": { + "type": "string", + "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." + } + }, + "required": [ + "progressId" + ] + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "InvalidatedEvent": { + "allOf": [ + { + "$ref": "#/definitions/Event" + }, + { + "type": "object", + "description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.\nThis event should only be sent if the debug adapter has received a value true for the 'supportsInvalidatedEvent' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ + "invalidated" + ] + }, + "body": { + "type": "object", + "properties": { + "areas": { + "type": "array", + "description": "Optional set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honouring the areas but there are no guarantees. If this property is missing, empty, or if values are not understand the client should assume a single value 'all'.", + "items": { + "$ref": "#/definitions/InvalidatedAreas" + } + }, + "threadId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this thread." + }, + "stackFrameId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this stack frame (and the 'threadId' is ignored)." + } + } + } + }, + "required": [ + "event", + "body" + ] + } + ] + }, + "RunInTerminalRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "title": "Reverse Requests", + "description": "This optional request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the client has passed the value true for the 'supportsRunInTerminalRequest' capability of the 'initialize' request.", + "properties": { + "command": { + "type": "string", + "enum": [ + "runInTerminal" + ] + }, + "arguments": { + "$ref": "#/definitions/RunInTerminalRequestArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "RunInTerminalRequestArguments": { + "type": "object", + "description": "Arguments for 'runInTerminal' request.", + "properties": { + "kind": { + "type": "string", + "enum": [ + "integrated", + "external" + ], + "description": "What kind of terminal to launch." + }, + "title": { + "type": "string", + "description": "Optional title of the terminal." + }, + "cwd": { + "type": "string", + "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of arguments. The first argument is the command to run." + }, + "env": { + "type": "object", + "description": "Environment key-value pairs that are added to or removed from the default environment.", + "additionalProperties": { + "type": [ + "string", + "null" + ], + "description": "Proper values must be strings. A value of 'null' removes the variable from the environment." + } + } + }, + "required": [ + "args", + "cwd" + ] + }, + "RunInTerminalResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'runInTerminal' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "processId": { + "type": "integer", + "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." + }, + "shellProcessId": { + "type": "integer", + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." + } + } + } + }, + "required": [ + "body" + ] + } + ] + }, + "InitializeRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "title": "Requests", + "description": "The 'initialize' request is sent as the first request from the client to the debug adapter\nin order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded to with an 'initialize' response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an 'initialize' response.\nThe 'initialize' request may only be sent once.", + "properties": { + "command": { + "type": "string", + "enum": [ + "initialize" + ] + }, + "arguments": { + "$ref": "#/definitions/InitializeRequestArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "InitializeRequestArguments": { + "type": "object", + "description": "Arguments for 'initialize' request.", + "properties": { + "clientID": { + "type": "string", + "description": "The ID of the (frontend) client using this adapter." + }, + "clientName": { + "type": "string", + "description": "The human readable name of the (frontend) client using this adapter." + }, + "adapterID": { + "type": "string", + "description": "The ID of the debug adapter." + }, + "locale": { + "type": "string", + "description": "The ISO-639 locale of the (frontend) client using this adapter, e.g. en-US or de-CH." + }, + "linesStartAt1": { + "type": "boolean", + "description": "If true all line numbers are 1-based (default)." + }, + "columnsStartAt1": { + "type": "boolean", + "description": "If true all column numbers are 1-based (default)." + }, + "pathFormat": { + "type": "string", + "_enum": [ + "path", + "uri" + ], + "description": "Determines in what format paths are specified. The default is 'path', which is the native format." + }, + "supportsVariableType": { + "type": "boolean", + "description": "Client supports the optional type attribute for variables." + }, + "supportsVariablePaging": { + "type": "boolean", + "description": "Client supports the paging of variables." + }, + "supportsRunInTerminalRequest": { + "type": "boolean", + "description": "Client supports the runInTerminal request." + }, + "supportsMemoryReferences": { + "type": "boolean", + "description": "Client supports memory references." + }, + "supportsProgressReporting": { + "type": "boolean", + "description": "Client supports progress reporting." + }, + "supportsInvalidatedEvent": { + "type": "boolean", + "description": "Client supports the invalidated event." + } + }, + "required": [ + "adapterID" + ] + }, + "InitializeResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'initialize' request.", + "properties": { + "body": { + "$ref": "#/definitions/Capabilities", + "description": "The capabilities of this debug adapter." + } + } + } + ] + }, + "ConfigurationDoneRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "This optional request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the 'initialized' event).\nClients should only call this request if the capability 'supportsConfigurationDoneRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "configurationDone" + ] + }, + "arguments": { + "$ref": "#/definitions/ConfigurationDoneArguments" + } + }, + "required": [ + "command" + ] + } + ] + }, + "ConfigurationDoneArguments": { + "type": "object", + "description": "Arguments for 'configurationDone' request." + }, + "ConfigurationDoneResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'configurationDone' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "LaunchRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if 'noDebug' is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { + "type": "string", + "enum": [ + "launch" + ] + }, + "arguments": { + "$ref": "#/definitions/LaunchRequestArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "LaunchRequestArguments": { + "type": "object", + "description": "Arguments for 'launch' request. Additional attributes are implementation specific.", + "properties": { + "noDebug": { + "type": "boolean", + "description": "If noDebug is true the launch request should launch the program without enabling debugging." + }, + "__restart": { + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact." + } + } + }, + "LaunchResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'launch' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "AttachRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The attach request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { + "type": "string", + "enum": [ + "attach" + ] + }, + "arguments": { + "$ref": "#/definitions/AttachRequestArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "AttachRequestArguments": { + "type": "object", + "description": "Arguments for 'attach' request. Additional attributes are implementation specific.", + "properties": { + "__restart": { + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact." + } + } + }, + "AttachResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'attach' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "RestartRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Restarts a debug session. Clients should only call this request if the capability 'supportsRestartRequest' is true.\nIf the capability is missing or has the value false, a typical client will emulate 'restart' by terminating the debug adapter first and then launching it anew.", + "properties": { + "command": { + "type": "string", + "enum": [ + "restart" + ] + }, + "arguments": { + "$ref": "#/definitions/RestartArguments" + } + }, + "required": [ + "command" + ] + } + ] + }, + "RestartArguments": { + "type": "object", + "description": "Arguments for 'restart' request.", + "properties": { + "arguments": { + "oneOf": [ + { + "$ref": "#/definitions/LaunchRequestArguments" + }, + { + "$ref": "#/definitions/AttachRequestArguments" + } + ], + "description": "The latest version of the 'launch' or 'attach' configuration." + } + } + }, + "RestartResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'restart' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "DisconnectRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging.\nIt asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter.\nIf the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the debuggee.\nIf the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the debuggee.\nThis behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug adapter).", + "properties": { + "command": { + "type": "string", + "enum": [ + "disconnect" + ] + }, + "arguments": { + "$ref": "#/definitions/DisconnectArguments" + } + }, + "required": [ + "command" + ] + } + ] + }, + "DisconnectArguments": { + "type": "object", + "description": "Arguments for 'disconnect' request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this 'disconnect' request is part of a restart sequence." + }, + "terminateDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the capability 'supportTerminateDebuggee' is true." + }, + "suspendDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the capability 'supportSuspendDebuggee' is true." + } + } + }, + "DisconnectResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'disconnect' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "TerminateRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself.\nClients should only call this request if the capability 'supportsTerminateRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "terminate" + ] + }, + "arguments": { + "$ref": "#/definitions/TerminateArguments" + } + }, + "required": [ + "command" + ] + } + ] + }, + "TerminateArguments": { + "type": "object", + "description": "Arguments for 'terminate' request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this 'terminate' request is part of a restart sequence." + } + } + }, + "TerminateResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'terminate' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "BreakpointLocationsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range.\nClients should only call this request if the capability 'supportsBreakpointLocationsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "breakpointLocations" + ] + }, + "arguments": { + "$ref": "#/definitions/BreakpointLocationsArguments" + } + }, + "required": [ + "command" + ] + } + ] + }, + "BreakpointLocationsArguments": { + "type": "object", + "description": "Arguments for 'breakpointLocations' request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified." + }, + "line": { + "type": "integer", + "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line." + }, + "column": { + "type": "integer", + "description": "Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed." + }, + "endLine": { + "type": "integer", + "description": "Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line." + }, + "endColumn": { + "type": "integer", + "description": "Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line." + } + }, + "required": [ + "source", + "line" + ] + }, + "BreakpointLocationsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'breakpointLocations' request.\nContains possible locations for source breakpoints.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/BreakpointLocation" + }, + "description": "Sorted set of possible breakpoint locations." + } + }, + "required": [ + "breakpoints" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "SetBreakpointsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.\nTo clear all breakpoint for a source, specify an empty array.\nWhen a breakpoint is hit, a 'stopped' event (with reason 'breakpoint') is generated.", + "properties": { + "command": { + "type": "string", + "enum": [ + "setBreakpoints" + ] + }, + "arguments": { + "$ref": "#/definitions/SetBreakpointsArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "SetBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setBreakpoints' request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified." + }, + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/SourceBreakpoint" + }, + "description": "The code locations of the breakpoints." + }, + "lines": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Deprecated: The code locations of the breakpoints." + }, + "sourceModified": { + "type": "boolean", + "description": "A value of true indicates that the underlying source has been modified which results in new breakpoint locations." + } + }, + "required": [ + "source" + ] + }, + "SetBreakpointsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'setBreakpoints' request.\nReturned is information about each breakpoint created by this request.\nThis includes the actual code location and whether the breakpoint could be verified.\nThe breakpoints returned are in the same order as the elements of the 'breakpoints'\n(or the deprecated 'lines') array in the arguments.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." + } + }, + "required": [ + "breakpoints" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "SetFunctionBreakpointsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated.\nClients should only call this request if the capability 'supportsFunctionBreakpoints' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "setFunctionBreakpoints" + ] + }, + "arguments": { + "$ref": "#/definitions/SetFunctionBreakpointsArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "SetFunctionBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setFunctionBreakpoints' request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/FunctionBreakpoint" + }, + "description": "The function names of the breakpoints." + } + }, + "required": [ + "breakpoints" + ] + }, + "SetFunctionBreakpointsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'setFunctionBreakpoints' request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." + } + }, + "required": [ + "breakpoints" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "SetExceptionBreakpointsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request configures the debuggers response to thrown exceptions.\nIf an exception is configured to break, a 'stopped' event is fired (with reason 'exception').\nClients should only call this request if the capability 'exceptionBreakpointFilters' returns one or more filters.", + "properties": { + "command": { + "type": "string", + "enum": [ + "setExceptionBreakpoints" + ] + }, + "arguments": { + "$ref": "#/definitions/SetExceptionBreakpointsArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "SetExceptionBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setExceptionBreakpoints' request.", + "properties": { + "filters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the 'exceptionBreakpointFilters' capability. The 'filter' and 'filterOptions' sets are additive." + }, + "filterOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionFilterOptions" + }, + "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the 'exceptionBreakpointFilters' capability. This attribute is only honored by a debug adapter if the capability 'supportsExceptionFilterOptions' is true. The 'filter' and 'filterOptions' sets are additive." + }, + "exceptionOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionOptions" + }, + "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the capability 'supportsExceptionOptions' is true." + } + }, + "required": [ + "filters" + ] + }, + "SetExceptionBreakpointsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'setExceptionBreakpoints' request.\nThe response contains an array of Breakpoint objects with information about each exception breakpoint or filter. The Breakpoint objects are in the same order as the elements of the 'filters', 'filterOptions', 'exceptionOptions' arrays given as arguments. If both 'filters' and 'filterOptions' are given, the returned array must start with 'filters' information first, followed by 'filterOptions' information.\nThe mandatory 'verified' property of a Breakpoint object signals whether the exception breakpoint or filter could be successfully created and whether the optional condition or hit count expressions are valid. In case of an error the 'message' property explains the problem. An optional 'id' property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.\nFor backward compatibility both the 'breakpoints' array and the enclosing 'body' are optional. If these elements are missing a client will not be able to show problems for individual exception breakpoints or filters.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the 'filters', 'filterOptions', 'exceptionOptions' arrays in the arguments. If both 'filters' and 'filterOptions' are given, the returned array must start with 'filters' information first, followed by 'filterOptions' information." + } + } + } + } + } + ] + }, + "DataBreakpointInfoRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "dataBreakpointInfo" + ] + }, + "arguments": { + "$ref": "#/definitions/DataBreakpointInfoArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "DataBreakpointInfoArguments": { + "type": "object", + "description": "Arguments for 'dataBreakpointInfo' request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "Reference to the Variable container if the data breakpoint is requested for a child of the container." + }, + "name": { + "type": "string", + "description": "The name of the Variable's child to obtain data breakpoint information for.\nIf variablesReference isn’t provided, this can be an expression." + } + }, + "required": [ + "name" + ] + }, + "DataBreakpointInfoResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'dataBreakpointInfo' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "dataId": { + "type": [ + "string", + "null" + ], + "description": "An identifier for the data on which a data breakpoint can be registered with the setDataBreakpoints request or null if no data breakpoint is available." + }, + "description": { + "type": "string", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." + }, + "accessTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpointAccessType" + }, + "description": "Optional attribute listing the available access types for a potential data breakpoint. A UI frontend could surface this information." + }, + "canPersist": { + "type": "boolean", + "description": "Optional attribute indicating that a potential data breakpoint could be persisted across sessions." + } + }, + "required": [ + "dataId", + "description" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "SetDataBreakpointsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "setDataBreakpoints" + ] + }, + "arguments": { + "$ref": "#/definitions/SetDataBreakpointsArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "SetDataBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setDataBreakpoints' request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpoint" + }, + "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." + } + }, + "required": [ + "breakpoints" + ] + }, + "SetDataBreakpointsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'setDataBreakpoints' request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument 'breakpoints' array." + } + }, + "required": [ + "breakpoints" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "SetInstructionBreakpointsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a 'stopped' event (with reason 'instruction breakpoint') is generated.\nClients should only call this request if the capability 'supportsInstructionBreakpoints' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "setInstructionBreakpoints" + ] + }, + "arguments": { + "$ref": "#/definitions/SetInstructionBreakpointsArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "SetInstructionBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setInstructionBreakpoints' request", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/InstructionBreakpoint" + }, + "description": "The instruction references of the breakpoints" + } + }, + "required": [ + "breakpoints" + ] + }, + "SetInstructionBreakpointsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'setInstructionBreakpoints' request", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." + } + }, + "required": [ + "breakpoints" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "ContinueRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request starts the debuggee to run again.", + "properties": { + "command": { + "type": "string", + "enum": [ + "continue" + ] + }, + "arguments": { + "$ref": "#/definitions/ContinueArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "ContinueArguments": { + "type": "object", + "description": "Arguments for 'continue' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Continue execution for the specified thread (if possible).\nIf the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true." + } + }, + "required": [ + "threadId" + ] + }, + "ContinueResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'continue' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "allThreadsContinued": { + "type": "boolean", + "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead.\nIf this attribute is missing a value of 'true' is assumed for backward compatibility." + } + } + } + }, + "required": [ + "body" + ] + } + ] + }, + "NextRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request starts the debuggee to run again for one step.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.", + "properties": { + "command": { + "type": "string", + "enum": [ + "next" + ] + }, + "arguments": { + "$ref": "#/definitions/NextArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "NextArguments": { + "type": "object", + "description": "Arguments for 'next' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'next' for this thread." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." + } + }, + "required": [ + "threadId" + ] + }, + "NextResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'next' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "StepInRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request starts the debuggee to step into a function/method if possible.\nIf it cannot step into a target, 'stepIn' behaves like 'next'.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.\nIf there are multiple function/method calls (or other targets) on the source line,\nthe optional argument 'targetId' can be used to control into which target the 'stepIn' should occur.\nThe list of possible targets for a given source line can be retrieved via the 'stepInTargets' request.", + "properties": { + "command": { + "type": "string", + "enum": [ + "stepIn" + ] + }, + "arguments": { + "$ref": "#/definitions/StepInArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "StepInArguments": { + "type": "object", + "description": "Arguments for 'stepIn' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'stepIn' for this thread." + }, + "targetId": { + "type": "integer", + "description": "Optional id of the target to step into." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." + } + }, + "required": [ + "threadId" + ] + }, + "StepInResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'stepIn' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "StepOutRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request starts the debuggee to run again for one step.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.", + "properties": { + "command": { + "type": "string", + "enum": [ + "stepOut" + ] + }, + "arguments": { + "$ref": "#/definitions/StepOutArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "StepOutArguments": { + "type": "object", + "description": "Arguments for 'stepOut' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'stepOut' for this thread." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." + } + }, + "required": [ + "threadId" + ] + }, + "StepOutResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'stepOut' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "StepBackRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request starts the debuggee to run one step backwards.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.\nClients should only call this request if the capability 'supportsStepBack' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "stepBack" + ] + }, + "arguments": { + "$ref": "#/definitions/StepBackArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "StepBackArguments": { + "type": "object", + "description": "Arguments for 'stepBack' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'stepBack' for this thread." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." + } + }, + "required": [ + "threadId" + ] + }, + "StepBackResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'stepBack' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "ReverseContinueRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request starts the debuggee to run backward.\nClients should only call this request if the capability 'supportsStepBack' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "reverseContinue" + ] + }, + "arguments": { + "$ref": "#/definitions/ReverseContinueArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "ReverseContinueArguments": { + "type": "object", + "description": "Arguments for 'reverseContinue' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'reverseContinue' for this thread." + } + }, + "required": [ + "threadId" + ] + }, + "ReverseContinueResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'reverseContinue' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "RestartFrameRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request restarts execution of the specified stackframe.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'restart') after the restart has completed.\nClients should only call this request if the capability 'supportsRestartFrame' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "restartFrame" + ] + }, + "arguments": { + "$ref": "#/definitions/RestartFrameArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "RestartFrameArguments": { + "type": "object", + "description": "Arguments for 'restartFrame' request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Restart this stackframe." + } + }, + "required": [ + "frameId" + ] + }, + "RestartFrameResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'restartFrame' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "GotoRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to executed code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a 'stopped' event with reason 'goto'.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true (because only then goto targets exist that can be passed as arguments).", + "properties": { + "command": { + "type": "string", + "enum": [ + "goto" + ] + }, + "arguments": { + "$ref": "#/definitions/GotoArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "GotoArguments": { + "type": "object", + "description": "Arguments for 'goto' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Set the goto target for this thread." + }, + "targetId": { + "type": "integer", + "description": "The location where the debuggee will continue to run." + } + }, + "required": [ + "threadId", + "targetId" + ] + }, + "GotoResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'goto' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "PauseRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request suspends the debuggee.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'pause') after the thread has been paused successfully.", + "properties": { + "command": { + "type": "string", + "enum": [ + "pause" + ] + }, + "arguments": { + "$ref": "#/definitions/PauseArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "PauseArguments": { + "type": "object", + "description": "Arguments for 'pause' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Pause execution for this thread." + } + }, + "required": [ + "threadId" + ] + }, + "PauseResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'pause' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "StackTraceRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' capability is true, stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached.", + "properties": { + "command": { + "type": "string", + "enum": [ + "stackTrace" + ] + }, + "arguments": { + "$ref": "#/definitions/StackTraceArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "StackTraceArguments": { + "type": "object", + "description": "Arguments for 'stackTrace' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Retrieve the stacktrace for this thread." + }, + "startFrame": { + "type": "integer", + "description": "The index of the first frame to return; if omitted frames start at 0." + }, + "levels": { + "type": "integer", + "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." + }, + "format": { + "$ref": "#/definitions/StackFrameFormat", + "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." + } + }, + "required": [ + "threadId" + ] + }, + "StackTraceResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'stackTrace' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "stackFrames": { + "type": "array", + "items": { + "$ref": "#/definitions/StackFrame" + }, + "description": "The frames of the stackframe. If the array has length zero, there are no stackframes available.\nThis means that there is no location information available." + }, + "totalFrames": { + "type": "integer", + "description": "The total number of frames available in the stack. If omitted or if totalFrames is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing totalFrames values for subsequent requests can be used to enforce paging in the client." + } + }, + "required": [ + "stackFrames" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "ScopesRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request returns the variable scopes for a given stackframe ID.", + "properties": { + "command": { + "type": "string", + "enum": [ + "scopes" + ] + }, + "arguments": { + "$ref": "#/definitions/ScopesArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "ScopesArguments": { + "type": "object", + "description": "Arguments for 'scopes' request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Retrieve the scopes for this stackframe." + } + }, + "required": [ + "frameId" + ] + }, + "ScopesResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'scopes' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "items": { + "$ref": "#/definitions/Scope" + }, + "description": "The scopes of the stackframe. If the array has length zero, there are no scopes available." + } + }, + "required": [ + "scopes" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "VariablesRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Retrieves all child variables for the given variable reference.\nAn optional filter can be used to limit the fetched children to either named or indexed children.", + "properties": { + "command": { + "type": "string", + "enum": [ + "variables" + ] + }, + "arguments": { + "$ref": "#/definitions/VariablesArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "VariablesArguments": { + "type": "object", + "description": "Arguments for 'variables' request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The Variable reference." + }, + "filter": { + "type": "string", + "enum": [ + "indexed", + "named" + ], + "description": "Optional filter to limit the child variables to either named or indexed. If omitted, both types are fetched." + }, + "start": { + "type": "integer", + "description": "The index of the first variable to return; if omitted children start at 0." + }, + "count": { + "type": "integer", + "description": "The number of variables to return. If count is missing or 0, all variables are returned." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." + } + }, + "required": [ + "variablesReference" + ] + }, + "VariablesResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'variables' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "variables": { + "type": "array", + "items": { + "$ref": "#/definitions/Variable" + }, + "description": "All (or a range) of variables for the given variable reference." + } + }, + "required": [ + "variables" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "SetVariableRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the capability 'supportsSetVariable' is true.\nIf a debug adapter implements both setVariable and setExpression, a client will only use setExpression if the variable has an evaluateName property.", + "properties": { + "command": { + "type": "string", + "enum": [ + "setVariable" + ] + }, + "arguments": { + "$ref": "#/definitions/SetVariableArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "SetVariableArguments": { + "type": "object", + "description": "Arguments for 'setVariable' request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The reference of the variable container." + }, + "name": { + "type": "string", + "description": "The name of the variable in the container." + }, + "value": { + "type": "string", + "description": "The value of the variable." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the response value." + } + }, + "required": [ + "variablesReference", + "name", + "value" + ] + }, + "SetVariableResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'setVariable' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The new value of the variable." + }, + "type": { + "type": "string", + "description": "The type of the new value. Typically shown in the UI when hovering over the value." + }, + "variablesReference": { + "type": "integer", + "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "SourceRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request retrieves the source code for a given source reference.", + "properties": { + "command": { + "type": "string", + "enum": [ + "source" + ] + }, + "arguments": { + "$ref": "#/definitions/SourceArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "SourceArguments": { + "type": "object", + "description": "Arguments for 'source' request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "Specifies the source content to load. Either source.path or source.sourceReference must be specified." + }, + "sourceReference": { + "type": "integer", + "description": "The reference to the source. This is the same as source.sourceReference.\nThis is provided for backward compatibility since old backends do not understand the 'source' attribute." + } + }, + "required": [ + "sourceReference" + ] + }, + "SourceResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'source' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Content of the source reference." + }, + "mimeType": { + "type": "string", + "description": "Optional content type (mime type) of the source." + } + }, + "required": [ + "content" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "ThreadsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request retrieves a list of all threads.", + "properties": { + "command": { + "type": "string", + "enum": [ + "threads" + ] + } + }, + "required": [ + "command" + ] + } + ] + }, + "ThreadsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'threads' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "threads": { + "type": "array", + "items": { + "$ref": "#/definitions/Thread" + }, + "description": "All threads." + } + }, + "required": [ + "threads" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "TerminateThreadsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "The request terminates the threads with the given ids.\nClients should only call this request if the capability 'supportsTerminateThreadsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "terminateThreads" + ] + }, + "arguments": { + "$ref": "#/definitions/TerminateThreadsArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "TerminateThreadsArguments": { + "type": "object", + "description": "Arguments for 'terminateThreads' request.", + "properties": { + "threadIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Ids of threads to be terminated." + } + } + }, + "TerminateThreadsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'terminateThreads' request. This is just an acknowledgement, so no body field is required." + } + ] + }, + "ModulesRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.\nClients should only call this request if the capability 'supportsModulesRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "modules" + ] + }, + "arguments": { + "$ref": "#/definitions/ModulesArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "ModulesArguments": { + "type": "object", + "description": "Arguments for 'modules' request.", + "properties": { + "startModule": { + "type": "integer", + "description": "The index of the first module to return; if omitted modules start at 0." + }, + "moduleCount": { + "type": "integer", + "description": "The number of modules to return. If moduleCount is not specified or 0, all modules are returned." + } + } + }, + "ModulesResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'modules' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/Module" + }, + "description": "All modules or range of modules." + }, + "totalModules": { + "type": "integer", + "description": "The total number of modules available." + } + }, + "required": [ + "modules" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "LoadedSourcesRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Retrieves the set of all sources currently loaded by the debugged process.\nClients should only call this request if the capability 'supportsLoadedSourcesRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "loadedSources" + ] + }, + "arguments": { + "$ref": "#/definitions/LoadedSourcesArguments" + } + }, + "required": [ + "command" + ] + } + ] + }, + "LoadedSourcesArguments": { + "type": "object", + "description": "Arguments for 'loadedSources' request." + }, + "LoadedSourcesResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'loadedSources' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "Set of loaded sources." + } + }, + "required": [ + "sources" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "EvaluateRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Evaluates the given expression in the context of the top most stack frame.\nThe expression has access to any variables and arguments that are in scope.", + "properties": { + "command": { + "type": "string", + "enum": [ + "evaluate" + ] + }, + "arguments": { + "$ref": "#/definitions/EvaluateArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "EvaluateArguments": { + "type": "object", + "description": "Arguments for 'evaluate' request.", + "properties": { + "expression": { + "type": "string", + "description": "The expression to evaluate." + }, + "frameId": { + "type": "integer", + "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope." + }, + "context": { + "type": "string", + "_enum": [ + "watch", + "repl", + "hover", + "clipboard" + ], + "enumDescriptions": [ + "evaluate is run in a watch.", + "evaluate is run from REPL console.", + "evaluate is run from a data hover.", + "evaluate is run to generate the value that will be stored in the clipboard.\nThe attribute is only honored by a debug adapter if the capability 'supportsClipboardContext' is true." + ], + "description": "The context in which the evaluate request is run." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the Evaluate result.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." + } + }, + "required": [ + "expression" + ] + }, + "EvaluateResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'evaluate' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "The result of the evaluate request." + }, + "type": { + "type": "string", + "description": "The optional type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a evaluate result that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "memoryReference": { + "type": "string", + "description": "Optional memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute should be returned by a debug adapter if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." + } + }, + "required": [ + "result", + "variablesReference" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "SetExpressionRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Evaluates the given 'value' expression and assigns it to the 'expression' which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the capability 'supportsSetExpression' is true.\nIf a debug adapter implements both setExpression and setVariable, a client will only use setExpression if the variable has an evaluateName property.", + "properties": { + "command": { + "type": "string", + "enum": [ + "setExpression" + ] + }, + "arguments": { + "$ref": "#/definitions/SetExpressionArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "SetExpressionArguments": { + "type": "object", + "description": "Arguments for 'setExpression' request.", + "properties": { + "expression": { + "type": "string", + "description": "The l-value expression to assign to." + }, + "value": { + "type": "string", + "description": "The value expression to assign to the l-value expression." + }, + "frameId": { + "type": "integer", + "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies how the resulting value should be formatted." + } + }, + "required": [ + "expression", + "value" + ] + }, + "SetExpressionResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'setExpression' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The new value of the expression." + }, + "type": { + "type": "string", + "description": "The optional type of the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a value that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + } + }, + "required": [ + "value" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "StepInTargetsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "This request retrieves the possible stepIn targets for the specified stack frame.\nThese targets can be used in the 'stepIn' request.\nThe StepInTargets may only be called if the 'supportsStepInTargetsRequest' capability exists and is true.\nClients should only call this request if the capability 'supportsStepInTargetsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "stepInTargets" + ] + }, + "arguments": { + "$ref": "#/definitions/StepInTargetsArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "StepInTargetsArguments": { + "type": "object", + "description": "Arguments for 'stepInTargets' request.", + "properties": { + "frameId": { + "type": "integer", + "description": "The stack frame for which to retrieve the possible stepIn targets." + } + }, + "required": [ + "frameId" + ] + }, + "StepInTargetsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'stepInTargets' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/StepInTarget" + }, + "description": "The possible stepIn targets of the specified source location." + } + }, + "required": [ + "targets" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "GotoTargetsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the 'goto' request.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "gotoTargets" + ] + }, + "arguments": { + "$ref": "#/definitions/GotoTargetsArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "GotoTargetsArguments": { + "type": "object", + "description": "Arguments for 'gotoTargets' request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location for which the goto targets are determined." + }, + "line": { + "type": "integer", + "description": "The line location for which the goto targets are determined." + }, + "column": { + "type": "integer", + "description": "An optional column location for which the goto targets are determined." + } + }, + "required": [ + "source", + "line" + ] + }, + "GotoTargetsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'gotoTargets' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/GotoTarget" + }, + "description": "The possible goto targets of the specified location." + } + }, + "required": [ + "targets" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "CompletionsRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Returns a list of possible completions for a given caret position and text.\nClients should only call this request if the capability 'supportsCompletionsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "completions" + ] + }, + "arguments": { + "$ref": "#/definitions/CompletionsArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "CompletionsArguments": { + "type": "object", + "description": "Arguments for 'completions' request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope." + }, + "text": { + "type": "string", + "description": "One or more source lines. Typically this is the text a user has typed into the debug console before he asked for completion." + }, + "column": { + "type": "integer", + "description": "The character position for which to determine the completion proposals." + }, + "line": { + "type": "integer", + "description": "An optional line for which to determine the completion proposals. If missing the first line of the text is assumed." + } + }, + "required": [ + "text", + "column" + ] + }, + "CompletionsResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'completions' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/CompletionItem" + }, + "description": "The possible completions for ." + } + }, + "required": [ + "targets" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "ExceptionInfoRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Retrieves the details of the exception that caused this event to be raised.\nClients should only call this request if the capability 'supportsExceptionInfoRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "exceptionInfo" + ] + }, + "arguments": { + "$ref": "#/definitions/ExceptionInfoArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "ExceptionInfoArguments": { + "type": "object", + "description": "Arguments for 'exceptionInfo' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Thread for which exception information should be retrieved." + } + }, + "required": [ + "threadId" + ] + }, + "ExceptionInfoResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'exceptionInfo' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "exceptionId": { + "type": "string", + "description": "ID of the exception that was thrown." + }, + "description": { + "type": "string", + "description": "Descriptive text for the exception provided by the debug adapter." + }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Mode that caused the exception notification to be raised." + }, + "details": { + "$ref": "#/definitions/ExceptionDetails", + "description": "Detailed information about the exception." + } + }, + "required": [ + "exceptionId", + "breakMode" + ] + } + }, + "required": [ + "body" + ] + } + ] + }, + "ReadMemoryRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Reads bytes from memory at the provided location.\nClients should only call this request if the capability 'supportsReadMemoryRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "readMemory" + ] + }, + "arguments": { + "$ref": "#/definitions/ReadMemoryArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "ReadMemoryArguments": { + "type": "object", + "description": "Arguments for 'readMemory' request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location from which data should be read." + }, + "offset": { + "type": "integer", + "description": "Optional offset (in bytes) to be applied to the reference location before reading data. Can be negative." + }, + "count": { + "type": "integer", + "description": "Number of bytes to read at the specified location and offset." + } + }, + "required": [ + "memoryReference", + "count" + ] + }, + "ReadMemoryResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'readMemory' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with '0x', or as a decimal value otherwise." + }, + "unreadableBytes": { + "type": "integer", + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." + }, + "data": { + "type": "string", + "description": "The bytes read from memory, encoded using base64." + } + }, + "required": [ + "address" + ] + } + } + } + ] + }, + "DisassembleRequest": { + "allOf": [ + { + "$ref": "#/definitions/Request" + }, + { + "type": "object", + "description": "Disassembles code stored at the provided location.\nClients should only call this request if the capability 'supportsDisassembleRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ + "disassemble" + ] + }, + "arguments": { + "$ref": "#/definitions/DisassembleArguments" + } + }, + "required": [ + "command", + "arguments" + ] + } + ] + }, + "DisassembleArguments": { + "type": "object", + "description": "Arguments for 'disassemble' request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location containing the instructions to disassemble." + }, + "offset": { + "type": "integer", + "description": "Optional offset (in bytes) to be applied to the reference location before disassembling. Can be negative." + }, + "instructionOffset": { + "type": "integer", + "description": "Optional offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative." + }, + "instructionCount": { + "type": "integer", + "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." + }, + "resolveSymbols": { + "type": "boolean", + "description": "If true, the adapter should attempt to resolve memory addresses and other values to symbolic names." + } + }, + "required": [ + "memoryReference", + "instructionCount" + ] + }, + "DisassembleResponse": { + "allOf": [ + { + "$ref": "#/definitions/Response" + }, + { + "type": "object", + "description": "Response to 'disassemble' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "instructions": { + "type": "array", + "items": { + "$ref": "#/definitions/DisassembledInstruction" + }, + "description": "The list of disassembled instructions." + } + }, + "required": [ + "instructions" + ] + } + } + } + ] + }, + "Capabilities": { + "type": "object", + "title": "Types", + "description": "Information about the capabilities of a debug adapter.", + "properties": { + "supportsConfigurationDoneRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'configurationDone' request." + }, + "supportsFunctionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports function breakpoints." + }, + "supportsConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports conditional breakpoints." + }, + "supportsHitConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports breakpoints that break execution after a specified number of hits." + }, + "supportsEvaluateForHovers": { + "type": "boolean", + "description": "The debug adapter supports a (side effect free) evaluate request for data hovers." + }, + "exceptionBreakpointFilters": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionBreakpointsFilter" + }, + "description": "Available exception filter options for the 'setExceptionBreakpoints' request." + }, + "supportsStepBack": { + "type": "boolean", + "description": "The debug adapter supports stepping back via the 'stepBack' and 'reverseContinue' requests." + }, + "supportsSetVariable": { + "type": "boolean", + "description": "The debug adapter supports setting a variable to a value." + }, + "supportsRestartFrame": { + "type": "boolean", + "description": "The debug adapter supports restarting a frame." + }, + "supportsGotoTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'gotoTargets' request." + }, + "supportsStepInTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'stepInTargets' request." + }, + "supportsCompletionsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'completions' request." + }, + "completionTriggerCharacters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the '.' character." + }, + "supportsModulesRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'modules' request." + }, + "additionalModuleColumns": { + "type": "array", + "items": { + "$ref": "#/definitions/ColumnDescriptor" + }, + "description": "The set of additional module information exposed by the debug adapter." + }, + "supportedChecksumAlgorithms": { + "type": "array", + "items": { + "$ref": "#/definitions/ChecksumAlgorithm" + }, + "description": "Checksum algorithms supported by the debug adapter." + }, + "supportsRestartRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'restart' request. In this case a client should not implement 'restart' by terminating and relaunching the adapter but by calling the RestartRequest." + }, + "supportsExceptionOptions": { + "type": "boolean", + "description": "The debug adapter supports 'exceptionOptions' on the setExceptionBreakpoints request." + }, + "supportsValueFormattingOptions": { + "type": "boolean", + "description": "The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest." + }, + "supportsExceptionInfoRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'exceptionInfo' request." + }, + "supportTerminateDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request." + }, + "supportSuspendDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the 'suspendDebuggee' attribute on the 'disconnect' request." + }, + "supportsDelayedStackTraceLoading": { + "type": "boolean", + "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported." + }, + "supportsLoadedSourcesRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'loadedSources' request." + }, + "supportsLogPoints": { + "type": "boolean", + "description": "The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint." + }, + "supportsTerminateThreadsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'terminateThreads' request." + }, + "supportsSetExpression": { + "type": "boolean", + "description": "The debug adapter supports the 'setExpression' request." + }, + "supportsTerminateRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'terminate' request." + }, + "supportsDataBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports data breakpoints." + }, + "supportsReadMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'readMemory' request." + }, + "supportsDisassembleRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'disassemble' request." + }, + "supportsCancelRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'cancel' request." + }, + "supportsBreakpointLocationsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'breakpointLocations' request." + }, + "supportsClipboardContext": { + "type": "boolean", + "description": "The debug adapter supports the 'clipboard' context value in the 'evaluate' request." + }, + "supportsSteppingGranularity": { + "type": "boolean", + "description": "The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests." + }, + "supportsInstructionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports adding breakpoints based on instruction references." + }, + "supportsExceptionFilterOptions": { + "type": "boolean", + "description": "The debug adapter supports 'filterOptions' as an argument on the 'setExceptionBreakpoints' request." + } + } + }, + "ExceptionBreakpointsFilter": { + "type": "object", + "description": "An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions are dealt with.", + "properties": { + "filter": { + "type": "string", + "description": "The internal ID of the filter option. This value is passed to the 'setExceptionBreakpoints' request." + }, + "label": { + "type": "string", + "description": "The name of the filter option. This will be shown in the UI." + }, + "description": { + "type": "string", + "description": "An optional help text providing additional information about the exception filter. This string is typically shown as a hover and must be translated." + }, + "default": { + "type": "boolean", + "description": "Initial value of the filter option. If not specified a value 'false' is assumed." + }, + "supportsCondition": { + "type": "boolean", + "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." + }, + "conditionDescription": { + "type": "string", + "description": "An optional help text providing information about the condition. This string is shown as the placeholder text for a text box and must be translated." + } + }, + "required": [ + "filter", + "label" + ] + }, + "Message": { + "type": "object", + "description": "A structured message object. Used to return errors from requests.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for the message." + }, + "format": { + "type": "string", + "description": "A format string for the message. Embedded variables have the form '{name}'.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes." + }, + "variables": { + "type": "object", + "description": "An object used as a dictionary for looking up the variables in the format string.", + "additionalProperties": { + "type": "string", + "description": "Values must be strings." + } + }, + "sendTelemetry": { + "type": "boolean", + "description": "If true send to telemetry." + }, + "showUser": { + "type": "boolean", + "description": "If true show user." + }, + "url": { + "type": "string", + "description": "An optional url where additional information about this message can be found." + }, + "urlLabel": { + "type": "string", + "description": "An optional label that is presented to the user as the UI for opening the url." + } + }, + "required": [ + "id", + "format" + ] + }, + "Module": { + "type": "object", + "description": "A Module object represents a row in the modules view.\nTwo attributes are mandatory: an id identifies a module in the modules view and is used in a ModuleEvent for identifying a module for adding, updating or deleting.\nThe name is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They will show up in the module View if they have a corresponding ColumnDescriptor.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names\nwe recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.", + "properties": { + "id": { + "type": [ + "integer", + "string" + ], + "description": "Unique identifier for the module." + }, + "name": { + "type": "string", + "description": "A name of the module." + }, + "path": { + "type": "string", + "description": "optional but recommended attributes.\nalways try to use these first before introducing additional attributes.\n\nLogical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module." + }, + "isOptimized": { + "type": "boolean", + "description": "True if the module is optimized." + }, + "isUserCode": { + "type": "boolean", + "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'." + }, + "version": { + "type": "string", + "description": "Version of Module." + }, + "symbolStatus": { + "type": "string", + "description": "User understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc." + }, + "symbolFilePath": { + "type": "string", + "description": "Logical full path to the symbol file. The exact definition is implementation defined." + }, + "dateTimeStamp": { + "type": "string", + "description": "Module created or modified." + }, + "addressRange": { + "type": "string", + "description": "Address range covered by this module." + } + }, + "required": [ + "id", + "name" + ] + }, + "ColumnDescriptor": { + "type": "object", + "description": "A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", + "properties": { + "attributeName": { + "type": "string", + "description": "Name of the attribute rendered in this column." + }, + "label": { + "type": "string", + "description": "Header UI label of column." + }, + "format": { + "type": "string", + "description": "Format to use for the rendered values in this column. TBD how the format strings looks like." + }, + "type": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "unixTimestampUTC" + ], + "description": "Datatype of values in this column. Defaults to 'string' if not specified." + }, + "width": { + "type": "integer", + "description": "Width of this column in characters (hint only)." + } + }, + "required": [ + "attributeName", + "label" + ] + }, + "ModulesViewDescriptor": { + "type": "object", + "description": "The ModulesViewDescriptor is the container for all declarative configuration options of a ModuleView.\nFor now it only specifies the columns to be shown in the modules view.", + "properties": { + "columns": { + "type": "array", + "items": { + "$ref": "#/definitions/ColumnDescriptor" + } + } + }, + "required": [ + "columns" + ] + }, + "Thread": { + "type": "object", + "description": "A Thread", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for the thread." + }, + "name": { + "type": "string", + "description": "A name of the thread." + } + }, + "required": [ + "id", + "name" + ] + }, + "Source": { + "type": "object", + "description": "A Source is a descriptor for source code.\nIt is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.", + "properties": { + "name": { + "type": "string", + "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." + }, + "path": { + "type": "string", + "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0)." + }, + "sourceReference": { + "type": "integer", + "description": "If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified).\nA sourceReference is only valid for a session, so it must not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "presentationHint": { + "type": "string", + "description": "An optional hint for how to present the source in the UI.\nA value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.", + "enum": [ + "normal", + "emphasize", + "deemphasize" + ] + }, + "origin": { + "type": "string", + "description": "The (optional) origin of this source: possible values 'internal module', 'inlined content from source map', etc." + }, + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "An optional list of sources that are related to this source. These may be the source that generated this source." + }, + "adapterData": { + "type": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ], + "description": "Optional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." + }, + "checksums": { + "type": "array", + "items": { + "$ref": "#/definitions/Checksum" + }, + "description": "The checksums associated with this file." + } + } + }, + "StackFrame": { + "type": "object", + "description": "A Stackframe contains the source location.", + "properties": { + "id": { + "type": "integer", + "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe." + }, + "name": { + "type": "string", + "description": "The name of the stack frame, typically a method name." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The optional source of the frame." + }, + "line": { + "type": "integer", + "description": "The line within the file of the frame. If source is null or doesn't exist, line is 0 and must be ignored." + }, + "column": { + "type": "integer", + "description": "The column within the line. If source is null or doesn't exist, column is 0 and must be ignored." + }, + "endLine": { + "type": "integer", + "description": "An optional end line of the range covered by the stack frame." + }, + "endColumn": { + "type": "integer", + "description": "An optional end column of the range covered by the stack frame." + }, + "canRestart": { + "type": "boolean", + "description": "Indicates whether this frame can be restarted with the 'restart' request. Clients should only use this if the debug adapter supports the 'restart' request (capability 'supportsRestartRequest' is true)." + }, + "instructionPointerReference": { + "type": "string", + "description": "Optional memory reference for the current instruction pointer in this frame." + }, + "moduleId": { + "type": [ + "integer", + "string" + ], + "description": "The module associated with this frame, if any." + }, + "presentationHint": { + "type": "string", + "enum": [ + "normal", + "label", + "subtle" + ], + "description": "An optional hint for how to present this frame in the UI.\nA value of 'label' can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of 'subtle' can be used to change the appearance of a frame in a 'subtle' way." + } + }, + "required": [ + "id", + "name", + "line", + "column" + ] + }, + "Scope": { + "type": "object", + "description": "A Scope is a named container for variables. Optionally a scope can map to a source or a range within a source.", + "properties": { + "name": { + "type": "string", + "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated." + }, + "presentationHint": { + "type": "string", + "description": "An optional hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", + "_enum": [ + "arguments", + "locals", + "registers" + ], + "enumDescriptions": [ + "Scope contains method arguments.", + "Scope contains local variables.", + "Scope contains registers. Only a single 'registers' scope should be returned from a 'scopes' request." + ] + }, + "variablesReference": { + "type": "integer", + "description": "The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named variables in this scope.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed variables in this scope.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks." + }, + "expensive": { + "type": "boolean", + "description": "If true, the number of variables in this scope is large or expensive to retrieve." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "Optional source for this scope." + }, + "line": { + "type": "integer", + "description": "Optional start line of the range covered by this scope." + }, + "column": { + "type": "integer", + "description": "Optional start column of the range covered by this scope." + }, + "endLine": { + "type": "integer", + "description": "Optional end line of the range covered by this scope." + }, + "endColumn": { + "type": "integer", + "description": "Optional end column of the range covered by this scope." + } + }, + "required": [ + "name", + "variablesReference", + "expensive" + ] + }, + "Variable": { + "type": "object", + "description": "A Variable is a name/value pair.\nOptionally a variable can have a 'type' that is shown if space permits or when hovering over the variable's name.\nAn optional 'kind' is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the VariablesRequest.\nIf the number of named or indexed children is large, the numbers should be returned via the optional 'namedVariables' and 'indexedVariables' attributes.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks.", + "properties": { + "name": { + "type": "string", + "description": "The variable's name." + }, + "value": { + "type": "string", + "description": "The variable's value. This can be a multi-line text, e.g. for a function the body of a function." + }, + "type": { + "type": "string", + "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a variable that can be used to determine how to render the variable in the UI." + }, + "evaluateName": { + "type": "string", + "description": "Optional evaluatable name of this variable which can be passed to the 'EvaluateRequest' to fetch the variable's value." + }, + "variablesReference": { + "type": "integer", + "description": "If variablesReference is > 0, the variable is structured and its children can be retrieved by passing variablesReference to the VariablesRequest." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks." + }, + "memoryReference": { + "type": "string", + "description": "Optional memory reference for the variable if the variable represents executable code, such as a function pointer.\nThis attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." + } + }, + "required": [ + "name", + "value", + "variablesReference" + ] + }, + "VariablePresentationHint": { + "type": "object", + "description": "Optional properties of a variable that can be used to determine how to render the variable in the UI.", + "properties": { + "kind": { + "description": "The kind of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ + "property", + "method", + "class", + "data", + "event", + "baseClass", + "innerClass", + "interface", + "mostDerivedClass", + "virtual", + "dataBreakpoint" + ], + "enumDescriptions": [ + "Indicates that the object is a property.", + "Indicates that the object is a method.", + "Indicates that the object is a class.", + "Indicates that the object is data.", + "Indicates that the object is an event.", + "Indicates that the object is a base class.", + "Indicates that the object is an inner class.", + "Indicates that the object is an interface.", + "Indicates that the object is the most derived class.", + "Indicates that the object is virtual, that means it is a synthetic object introducedby the\nadapter for rendering purposes, e.g. an index range for large arrays.", + "Deprecated: Indicates that a data breakpoint is registered for the object. The 'hasDataBreakpoint' attribute should generally be used instead." + ] + }, + "attributes": { + "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", + "type": "array", + "items": { + "type": "string", + "_enum": [ + "static", + "constant", + "readOnly", + "rawString", + "hasObjectId", + "canHaveObjectId", + "hasSideEffects", + "hasDataBreakpoint" + ], + "enumDescriptions": [ + "Indicates that the object is static.", + "Indicates that the object is a constant.", + "Indicates that the object is read only.", + "Indicates that the object is a raw string.", + "Indicates that the object can have an Object ID created for it.", + "Indicates that the object has an Object ID associated with it.", + "Indicates that the evaluation had side effects.", + "Indicates that the object has its value tracked by a data breakpoint." + ] + } + }, + "visibility": { + "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ + "public", + "private", + "protected", + "internal", + "final" + ] + } + } + }, + "BreakpointLocation": { + "type": "object", + "description": "Properties of a breakpoint location returned from the 'breakpointLocations' request.", + "properties": { + "line": { + "type": "integer", + "description": "Start line of breakpoint location." + }, + "column": { + "type": "integer", + "description": "Optional start column of breakpoint location." + }, + "endLine": { + "type": "integer", + "description": "Optional end line of breakpoint location if the location covers a range." + }, + "endColumn": { + "type": "integer", + "description": "Optional end column of breakpoint location if the location covers a range." + } + }, + "required": [ + "line" + ] + }, + "SourceBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint or logpoint passed to the setBreakpoints request.", + "properties": { + "line": { + "type": "integer", + "description": "The source line of the breakpoint or logpoint." + }, + "column": { + "type": "integer", + "description": "An optional source column of the breakpoint." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." + }, + "logMessage": { + "type": "string", + "description": "If this attribute exists and is non-empty, the backend must not 'break' (stop)\nbut log the message instead. Expressions within {} are interpolated.\nThe attribute is only honored by a debug adapter if the capability 'supportsLogPoints' is true." + } + }, + "required": [ + "line" + ] + }, + "FunctionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the setFunctionBreakpoints request.", + "properties": { + "name": { + "type": "string", + "description": "The name of the function." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." + } + }, + "required": [ + "name" + ] + }, + "DataBreakpointAccessType": { + "type": "string", + "description": "This enumeration defines all possible access types for data breakpoints.", + "enum": [ + "read", + "write", + "readWrite" + ] + }, + "DataBreakpoint": { + "type": "object", + "description": "Properties of a data breakpoint passed to the setDataBreakpoints request.", + "properties": { + "dataId": { + "type": "string", + "description": "An id representing the data. This id is returned from the dataBreakpointInfo request." + }, + "accessType": { + "$ref": "#/definitions/DataBreakpointAccessType", + "description": "The access type of the data." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed." + } + }, + "required": [ + "dataId" + ] + }, + "InstructionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the setInstructionBreakpoints request", + "properties": { + "instructionReference": { + "type": "string", + "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an EvaluateResponse, Variable, StackFrame, GotoTarget, or Breakpoint." + }, + "offset": { + "type": "integer", + "description": "An optional offset from the instruction reference.\nThis can be negative." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." + } + }, + "required": [ + "instructionReference" + ] + }, + "Breakpoint": { + "type": "object", + "description": "Information about a Breakpoint created in setBreakpoints, setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints.", + "properties": { + "id": { + "type": "integer", + "description": "An optional identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints." + }, + "verified": { + "type": "boolean", + "description": "If true breakpoint could be set (but not necessarily at the desired location)." + }, + "message": { + "type": "string", + "description": "An optional message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source where the breakpoint is located." + }, + "line": { + "type": "integer", + "description": "The start line of the actual range covered by the breakpoint." + }, + "column": { + "type": "integer", + "description": "An optional start column of the actual range covered by the breakpoint." + }, + "endLine": { + "type": "integer", + "description": "An optional end line of the actual range covered by the breakpoint." + }, + "endColumn": { + "type": "integer", + "description": "An optional end column of the actual range covered by the breakpoint.\nIf no end line is given, then the end column is assumed to be in the start line." + }, + "instructionReference": { + "type": "string", + "description": "An optional memory reference to where the breakpoint is set." + }, + "offset": { + "type": "integer", + "description": "An optional offset from the instruction reference.\nThis can be negative." + } + }, + "required": [ + "verified" + ] + }, + "SteppingGranularity": { + "type": "string", + "description": "The granularity of one 'step' in the stepping requests 'next', 'stepIn', 'stepOut', and 'stepBack'.", + "enum": [ + "statement", + "line", + "instruction" + ], + "enumDescriptions": [ + "The step should allow the program to run until the current statement has finished executing.\nThe meaning of a statement is determined by the adapter and it may be considered equivalent to a line.\nFor example 'for(int i = 0; i < 10; i++) could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.", + "The step should allow the program to run until the current source line has executed.", + "The step should allow one instruction to execute (e.g. one x86 instruction)." + ] + }, + "StepInTarget": { + "type": "object", + "description": "A StepInTarget can be used in the 'stepIn' request and determines into which single target the stepIn request should step.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for a stepIn target." + }, + "label": { + "type": "string", + "description": "The name of the stepIn target (shown in the UI)." + } + }, + "required": [ + "id", + "label" + ] + }, + "GotoTarget": { + "type": "object", + "description": "A GotoTarget describes a code location that can be used as a target in the 'goto' request.\nThe possible goto targets can be determined via the 'gotoTargets' request.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for a goto target. This is used in the goto request." + }, + "label": { + "type": "string", + "description": "The name of the goto target (shown in the UI)." + }, + "line": { + "type": "integer", + "description": "The line of the goto target." + }, + "column": { + "type": "integer", + "description": "An optional column of the goto target." + }, + "endLine": { + "type": "integer", + "description": "An optional end line of the range covered by the goto target." + }, + "endColumn": { + "type": "integer", + "description": "An optional end column of the range covered by the goto target." + }, + "instructionPointerReference": { + "type": "string", + "description": "Optional memory reference for the instruction pointer value represented by this target." + } + }, + "required": [ + "id", + "label", + "line" + ] + }, + "CompletionItem": { + "type": "object", + "description": "CompletionItems are the suggestions returned from the CompletionsRequest.", + "properties": { + "label": { + "type": "string", + "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion." + }, + "text": { + "type": "string", + "description": "If text is not falsy then it is inserted instead of the label." + }, + "sortText": { + "type": "string", + "description": "A string that should be used when comparing this item with other items. When `falsy` the label is used." + }, + "type": { + "$ref": "#/definitions/CompletionItemType", + "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon." + }, + "start": { + "type": "integer", + "description": "This value determines the location (in the CompletionsRequest's 'text' attribute) where the completion text is added.\nIf missing the text is added at the location specified by the CompletionsRequest's 'column' attribute." + }, + "length": { + "type": "integer", + "description": "This value determines how many characters are overwritten by the completion text.\nIf missing the value 0 is assumed which results in the completion text being inserted." + }, + "selectionStart": { + "type": "integer", + "description": "Determines the start of the new selection after the text has been inserted (or replaced).\nThe start position must in the range 0 and length of the completion text.\nIf omitted the selection starts at the end of the completion text." + }, + "selectionLength": { + "type": "integer", + "description": "Determines the length of the new selection after the text has been inserted (or replaced).\nThe selection can not extend beyond the bounds of the completion text.\nIf omitted the length is assumed to be 0." + } + }, + "required": [ + "label" + ] + }, + "CompletionItemType": { + "type": "string", + "description": "Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.", + "enum": [ + "method", + "function", + "constructor", + "field", + "variable", + "class", + "interface", + "module", + "property", + "unit", + "value", + "enum", + "keyword", + "snippet", + "text", + "color", + "file", + "reference", + "customcolor" + ] + }, + "ChecksumAlgorithm": { + "type": "string", + "description": "Names of checksum algorithms that may be supported by a debug adapter.", + "enum": [ + "MD5", + "SHA1", + "SHA256", + "timestamp" + ] + }, + "Checksum": { + "type": "object", + "description": "The checksum of an item calculated by the specified algorithm.", + "properties": { + "algorithm": { + "$ref": "#/definitions/ChecksumAlgorithm", + "description": "The algorithm used to calculate this checksum." + }, + "checksum": { + "type": "string", + "description": "Value of the checksum." + } + }, + "required": [ + "algorithm", + "checksum" + ] + }, + "ValueFormat": { + "type": "object", + "description": "Provides formatting information for a value.", + "properties": { + "hex": { + "type": "boolean", + "description": "Display the value in hex." + } + } + }, + "StackFrameFormat": { + "allOf": [ + { + "$ref": "#/definitions/ValueFormat" + }, + { + "type": "object", + "description": "Provides formatting information for a stack frame.", + "properties": { + "parameters": { + "type": "boolean", + "description": "Displays parameters for the stack frame." + }, + "parameterTypes": { + "type": "boolean", + "description": "Displays the types of parameters for the stack frame." + }, + "parameterNames": { + "type": "boolean", + "description": "Displays the names of parameters for the stack frame." + }, + "parameterValues": { + "type": "boolean", + "description": "Displays the values of parameters for the stack frame." + }, + "line": { + "type": "boolean", + "description": "Displays the line number of the stack frame." + }, + "module": { + "type": "boolean", + "description": "Displays the module of the stack frame." + }, + "includeAll": { + "type": "boolean", + "description": "Includes all stack frames, including those the debug adapter might otherwise hide." + } + } + } + ] + }, + "ExceptionFilterOptions": { + "type": "object", + "description": "An ExceptionFilterOptions is used to specify an exception filter together with a condition for the setExceptionsFilter request.", + "properties": { + "filterId": { + "type": "string", + "description": "ID of an exception filter returned by the 'exceptionBreakpointFilters' capability." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional exceptions.\nThe exception will break into the debugger if the result of the condition is true." + } + }, + "required": [ + "filterId" + ] + }, + "ExceptionOptions": { + "type": "object", + "description": "An ExceptionOptions assigns configuration options to a set of exceptions.", + "properties": { + "path": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionPathSegment" + }, + "description": "A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." + }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Condition when a thrown exception should result in a break." + } + }, + "required": [ + "breakMode" + ] + }, + "ExceptionBreakMode": { + "type": "string", + "description": "This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.", + "enum": [ + "never", + "always", + "unhandled", + "userUnhandled" + ] + }, + "ExceptionPathSegment": { + "type": "object", + "description": "An ExceptionPathSegment represents a segment in a path that is used to match leaves or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if 'negate' is false or missing or\nit matches anything except the names provided if 'negate' is true.", + "properties": { + "negate": { + "type": "boolean", + "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided." + }, + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Depending on the value of 'negate' the names that should match or not match." + } + }, + "required": [ + "names" + ] + }, + "ExceptionDetails": { + "type": "object", + "description": "Detailed information about an exception that has occurred.", + "properties": { + "message": { + "type": "string", + "description": "Message contained in the exception." + }, + "typeName": { + "type": "string", + "description": "Short type name of the exception object." + }, + "fullTypeName": { + "type": "string", + "description": "Fully-qualified type name of the exception object." + }, + "evaluateName": { + "type": "string", + "description": "Optional expression that can be evaluated in the current scope to obtain the exception object." + }, + "stackTrace": { + "type": "string", + "description": "Stack trace at the time the exception was thrown." + }, + "innerException": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionDetails" + }, + "description": "Details of the exception contained by this exception, if any." + } + } + }, + "DisassembledInstruction": { + "type": "object", + "description": "Represents a single disassembled instruction.", + "properties": { + "address": { + "type": "string", + "description": "The address of the instruction. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise." + }, + "instructionBytes": { + "type": "string", + "description": "Optional raw bytes representing the instruction and its operands, in an implementation-defined format." + }, + "instruction": { + "type": "string", + "description": "Text representing the instruction and its operands, in an implementation-defined format." + }, + "symbol": { + "type": "string", + "description": "Name of the symbol that corresponds with the location of this instruction, if any." + }, + "location": { + "$ref": "#/definitions/Source", + "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction." + }, + "line": { + "type": "integer", + "description": "The line within the source location that corresponds to this instruction, if any." + }, + "column": { + "type": "integer", + "description": "The column within the line that corresponds to this instruction, if any." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range that corresponds to this instruction, if any." + }, + "endColumn": { + "type": "integer", + "description": "The end column of the range that corresponds to this instruction, if any." + } + }, + "required": [ + "address", + "instruction" + ] + }, + "InvalidatedAreas": { + "type": "string", + "description": "Logical areas that can be invalidated by the 'invalidated' event.", + "_enum": [ + "all", + "stacks", + "threads", + "variables" + ], + "enumDescriptions": [ + "All previously fetched data has become invalid and needs to be refetched.", + "Previously fetched stack related data has become invalid and needs to be refetched.", + "Previously fetched thread related data has become invalid and needs to be refetched.", + "Previously fetched variable data has become invalid and needs to be refetched." + ] + } + } } From 894d8def991be6917185522dea01cb87e5986b34 Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Tue, 12 Nov 2024 18:23:09 +0700 Subject: [PATCH 05/11] Remove redundant returns --- crates/services/txpool_v2/src/service.rs | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/services/txpool_v2/src/service.rs b/crates/services/txpool_v2/src/service.rs index 9e252d90401..0b92339eac5 100644 --- a/crates/services/txpool_v2/src/service.rs +++ b/crates/services/txpool_v2/src/service.rs @@ -230,38 +230,38 @@ where biased; _ = watcher.while_started() => { - return TaskRunResult::Stop + TaskRunResult::Stop } block_result = self.subscriptions.imported_blocks.next() => { if let Some(result) = block_result { self.import_block(result); - return TaskRunResult::Continue + TaskRunResult::Continue } else { - return TaskRunResult::Stop + TaskRunResult::Stop } } select_transaction_request = self.subscriptions.borrow_txpool.recv() => { if let Some(select_transaction_request) = select_transaction_request { self.borrow_txpool(select_transaction_request); - return TaskRunResult::Continue + TaskRunResult::Continue } else { - return TaskRunResult::Stop + TaskRunResult::Stop } } _ = self.pruner.ttl_timer.tick() => { self.try_prune_transactions(); - return TaskRunResult::Continue + TaskRunResult::Continue } write_pool_request = self.subscriptions.write_pool.recv() => { if let Some(write_pool_request) = write_pool_request { self.process_write(write_pool_request); - return TaskRunResult::Continue + TaskRunResult::Continue } else { - return TaskRunResult::Continue + TaskRunResult::Continue } } @@ -270,27 +270,27 @@ where if let Some(tx) = data { self.manage_tx_from_p2p(tx, message_id, peer_id); } - return TaskRunResult::Continue + TaskRunResult::Continue } else { - return TaskRunResult::Stop + TaskRunResult::Stop } } new_peer_subscribed = self.subscriptions.new_tx_source.next() => { if let Some(peer_id) = new_peer_subscribed { self.manage_new_peer_subscribed(peer_id); - return TaskRunResult::Continue + TaskRunResult::Continue } else { - return TaskRunResult::Stop + TaskRunResult::Stop } } read_pool_request = self.subscriptions.read_pool.recv() => { if let Some(read_pool_request) = read_pool_request { self.process_read(read_pool_request); - return TaskRunResult::Continue + TaskRunResult::Continue } else { - return TaskRunResult::Stop + TaskRunResult::Stop } } } From 81e1a909a0449026bd3722cf1ae11eb3345f2d95 Mon Sep 17 00:00:00 2001 From: Mitchell Turner Date: Tue, 12 Nov 2024 18:23:30 +0700 Subject: [PATCH 06/11] Update crates/services/p2p/src/service.rs --- crates/services/p2p/src/service.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/services/p2p/src/service.rs b/crates/services/p2p/src/service.rs index 7f2aad58e4a..037d32aa61f 100644 --- a/crates/services/p2p/src/service.rs +++ b/crates/services/p2p/src/service.rs @@ -925,8 +925,8 @@ where // report_message(&mut self.p2p_service, message, acceptance); match self.p2p_service.report_message(message, acceptance) { Ok(_) => {}, - Err(e) => { - return e.into() + Err(err) => { + return err.into() } }; } From b091adffcf1d3bcbd3069011fb0084f3ca8fbbd6 Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Tue, 12 Nov 2024 18:26:10 +0700 Subject: [PATCH 07/11] Revert file back to master --- .../client/assets/debugAdapterProtocol.json | 9090 +++++++---------- 1 file changed, 3945 insertions(+), 5145 deletions(-) diff --git a/crates/client/assets/debugAdapterProtocol.json b/crates/client/assets/debugAdapterProtocol.json index aeb42503296..44a0c2eed9c 100644 --- a/crates/client/assets/debugAdapterProtocol.json +++ b/crates/client/assets/debugAdapterProtocol.json @@ -1,5147 +1,3947 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Debug Adapter Protocol", - "description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.", - "type": "object", - "definitions": { - "ProtocolMessage": { - "type": "object", - "title": "Base Protocol", - "description": "Base class of requests, responses, and events.", - "properties": { - "seq": { - "type": "integer", - "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." - }, - "type": { - "type": "string", - "description": "Message type.", - "_enum": [ - "request", - "response", - "event" - ] - } - }, - "required": [ - "seq", - "type" - ] - }, - "Request": { - "allOf": [ - { - "$ref": "#/definitions/ProtocolMessage" - }, - { - "type": "object", - "description": "A client or debug adapter initiated request.", - "properties": { - "type": { - "type": "string", - "enum": [ - "request" - ] - }, - "command": { - "type": "string", - "description": "The command to execute." - }, - "arguments": { - "type": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ], - "description": "Object containing arguments for the command." - } - }, - "required": [ - "type", - "command" - ] - } - ] - }, - "Event": { - "allOf": [ - { - "$ref": "#/definitions/ProtocolMessage" - }, - { - "type": "object", - "description": "A debug adapter initiated event.", - "properties": { - "type": { - "type": "string", - "enum": [ - "event" - ] - }, - "event": { - "type": "string", - "description": "Type of event." - }, - "body": { - "type": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ], - "description": "Event-specific information." - } - }, - "required": [ - "type", - "event" - ] - } - ] - }, - "Response": { - "allOf": [ - { - "$ref": "#/definitions/ProtocolMessage" - }, - { - "type": "object", - "description": "Response for a request.", - "properties": { - "type": { - "type": "string", - "enum": [ - "response" - ] - }, - "request_seq": { - "type": "integer", - "description": "Sequence number of the corresponding request." - }, - "success": { - "type": "boolean", - "description": "Outcome of the request.\nIf true, the request was successful and the 'body' attribute may contain the result of the request.\nIf the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error')." - }, - "command": { - "type": "string", - "description": "The command requested." - }, - "message": { - "type": "string", - "description": "Contains the raw error in short form if 'success' is false.\nThis raw error might be interpreted by the frontend and is not shown in the UI.\nSome predefined values exist.", - "_enum": [ - "cancelled" - ], - "enumDescriptions": [ - "request was cancelled." - ] - }, - "body": { - "type": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ], - "description": "Contains request result if success is true and optional error details if success is false." - } - }, - "required": [ - "type", - "request_seq", - "success", - "command" - ] - } - ] - }, - "ErrorResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "On error (whenever 'success' is false), the body can provide more details.", - "properties": { - "body": { - "type": "object", - "properties": { - "error": { - "$ref": "#/definitions/Message", - "description": "An optional, structured error message." - } - } - } - }, - "required": [ - "body" - ] - } - ] - }, - "CancelRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The 'cancel' request is used by the frontend in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence. Clients should only call this request if the capability 'supportsCancelRequest' is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honouring this request but there are no guarantees.\nThe 'cancel' request may return an error if it could not cancel an operation but a frontend should refrain from presenting this error to end users.\nA frontend client should only call this request if the capability 'supportsCancelRequest' is true.\nThe request that got canceled still needs to send a response back. This can either be a normal result ('success' attribute true)\nor an error response ('success' attribute false and the 'message' set to 'cancelled').\nReturning partial results from a cancelled request is possible but please note that a frontend client has no generic way for detecting that a response is partial or not.\n The progress that got cancelled still needs to send a 'progressEnd' event back.\n A client should not assume that progress just got cancelled after sending the 'cancel' request.", - "properties": { - "command": { - "type": "string", - "enum": [ - "cancel" - ] - }, - "arguments": { - "$ref": "#/definitions/CancelArguments" - } - }, - "required": [ - "command" - ] - } - ] - }, - "CancelArguments": { - "type": "object", - "description": "Arguments for 'cancel' request.", - "properties": { - "requestId": { - "type": "integer", - "description": "The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.\nBoth a 'requestId' and a 'progressId' can be specified in one request." - }, - "progressId": { - "type": "string", - "description": "The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.\nBoth a 'requestId' and a 'progressId' can be specified in one request." - } - } - }, - "CancelResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'cancel' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "InitializedEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "title": "Events", - "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. SetBreakpointsRequest, SetExceptionBreakpointsRequest).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the 'initialize' request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends 'initialized' event (after the 'initialize' request has returned)\n- frontend sends zero or more 'setBreakpoints' requests\n- frontend sends one 'setFunctionBreakpoints' request (if capability 'supportsFunctionBreakpoints' is true)\n- frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false)\n- frontend sends other future configuration requests\n- frontend sends one 'configurationDone' request to indicate the end of the configuration.", - "properties": { - "event": { - "type": "string", - "enum": [ - "initialized" - ] - } - }, - "required": [ - "event" - ] - } - ] - }, - "StoppedEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a break point previously set, a stepping request has completed, by executing a debugger statement etc.", - "properties": { - "event": { - "type": "string", - "enum": [ - "stopped" - ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the 'description' attribute is missing (but it must not be translated).", - "_enum": [ - "step", - "breakpoint", - "exception", - "pause", - "entry", - "goto", - "function breakpoint", - "data breakpoint", - "instruction breakpoint" - ] - }, - "description": { - "type": "string", - "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and must be translated." - }, - "threadId": { - "type": "integer", - "description": "The thread which was stopped." - }, - "preserveFocusHint": { - "type": "boolean", - "description": "A value of true hints to the frontend that this event should not change the focus." - }, - "text": { - "type": "string", - "description": "Additional information. E.g. if reason is 'exception', text contains the exception name. This string is shown in the UI." - }, - "allThreadsStopped": { - "type": "boolean", - "description": "If 'allThreadsStopped' is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given threadId can be expanded." - }, - "hitBreakpointIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Ids of the breakpoints that triggered the event. In most cases there will be only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." - } - }, - "required": [ - "reason" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "ContinuedEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that the execution of the debuggee has continued.\nPlease note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. 'launch' or 'continue'.\nIt is only necessary to send a 'continued' event if there was no previous request that implied this.", - "properties": { - "event": { - "type": "string", - "enum": [ - "continued" - ] - }, - "body": { - "type": "object", - "properties": { - "threadId": { - "type": "integer", - "description": "The thread which was continued." - }, - "allThreadsContinued": { - "type": "boolean", - "description": "If 'allThreadsContinued' is true, a debug adapter can announce that all threads have continued." - } - }, - "required": [ - "threadId" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "ExitedEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that the debuggee has exited and returns its exit code.", - "properties": { - "event": { - "type": "string", - "enum": [ - "exited" - ] - }, - "body": { - "type": "object", - "properties": { - "exitCode": { - "type": "integer", - "description": "The exit code returned from the debuggee." - } - }, - "required": [ - "exitCode" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "TerminatedEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.", - "properties": { - "event": { - "type": "string", - "enum": [ - "terminated" - ] - }, - "body": { - "type": "object", - "properties": { - "restart": { - "type": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ], - "description": "A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests." - } - } - } - }, - "required": [ - "event" - ] - } - ] - }, - "ThreadEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that a thread has started or exited.", - "properties": { - "event": { - "type": "string", - "enum": [ - "thread" - ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "_enum": [ - "started", - "exited" - ] - }, - "threadId": { - "type": "integer", - "description": "The identifier of the thread." - } - }, - "required": [ - "reason", - "threadId" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "OutputEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that the target has produced some output.", - "properties": { - "event": { - "type": "string", - "enum": [ - "output" - ] - }, - "body": { - "type": "object", - "properties": { - "category": { - "type": "string", - "description": "The output category. If not specified, 'console' is assumed.", - "_enum": [ - "console", - "stdout", - "stderr", - "telemetry" - ] - }, - "output": { - "type": "string", - "description": "The output to report." - }, - "group": { - "type": "string", - "description": "Support for keeping an output log organized by grouping related messages.", - "enum": [ - "start", - "startCollapsed", - "end" - ], - "enumDescriptions": [ - "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe 'output' attribute becomes the name of the group and is not indented.", - "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe 'output' attribute becomes the name of the group and is not indented.", - "End the current group and decreases the indentation of subsequent output events.\nA non empty 'output' attribute is shown as the unindented end of the group." - ] - }, - "variablesReference": { - "type": "integer", - "description": "If an attribute 'variablesReference' exists and its value is > 0, the output contains objects which can be retrieved by passing 'variablesReference' to the 'variables' request. The value should be less than or equal to 2147483647 (2^31-1)." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "An optional source location where the output was produced." - }, - "line": { - "type": "integer", - "description": "An optional source location line where the output was produced." - }, - "column": { - "type": "integer", - "description": "An optional source location column where the output was produced." - }, - "data": { - "type": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ], - "description": "Optional data to report. For the 'telemetry' category the data will be sent to telemetry, for the other categories the data is shown in JSON format." - } - }, - "required": [ - "output" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "BreakpointEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that some information about a breakpoint has changed.", - "properties": { - "event": { - "type": "string", - "enum": [ - "breakpoint" - ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "_enum": [ - "changed", - "new", - "removed" - ] - }, - "breakpoint": { - "$ref": "#/definitions/Breakpoint", - "description": "The 'id' attribute is used to find the target breakpoint and the other attributes are used as the new values." - } - }, - "required": [ - "reason", - "breakpoint" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "ModuleEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that some information about a module has changed.", - "properties": { - "event": { - "type": "string", - "enum": [ - "module" - ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "enum": [ - "new", - "changed", - "removed" - ] - }, - "module": { - "$ref": "#/definitions/Module", - "description": "The new, changed, or removed module. In case of 'removed' only the module id is used." - } - }, - "required": [ - "reason", - "module" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "LoadedSourceEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.", - "properties": { - "event": { - "type": "string", - "enum": [ - "loadedSource" - ] - }, - "body": { - "type": "object", - "properties": { - "reason": { - "type": "string", - "description": "The reason for the event.", - "enum": [ - "new", - "changed", - "removed" - ] - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The new, changed, or removed source." - } - }, - "required": [ - "reason", - "source" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "ProcessEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.", - "properties": { - "event": { - "type": "string", - "enum": [ - "process" - ] - }, - "body": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." - }, - "systemProcessId": { - "type": "integer", - "description": "The system process id of the debugged process. This property will be missing for non-system processes." - }, - "isLocalProcess": { - "type": "boolean", - "description": "If true, the process is running on the same computer as the debug adapter." - }, - "startMethod": { - "type": "string", - "enum": [ - "launch", - "attach", - "attachForSuspendedLaunch" - ], - "description": "Describes how the debug engine started debugging this process.", - "enumDescriptions": [ - "Process was launched under the debugger.", - "Debugger attached to an existing process.", - "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." - ] - }, - "pointerSize": { - "type": "integer", - "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." - } - }, - "required": [ - "name" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "CapabilitiesEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the frontend and its UI, it might not be possible to change that at random times (or too late).\nConsequently this event has a hint characteristic: a frontend can only be expected to make a 'best effort' in honouring individual capabilities but there are no guarantees.\nOnly changed capabilities need to be included, all other capabilities keep their values.", - "properties": { - "event": { - "type": "string", - "enum": [ - "capabilities" - ] - }, - "body": { - "type": "object", - "properties": { - "capabilities": { - "$ref": "#/definitions/Capabilities", - "description": "The set of updated capabilities." - } - }, - "required": [ - "capabilities" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "ProgressStartEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event signals that a long running operation is about to start and\nprovides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", - "properties": { - "event": { - "type": "string", - "enum": [ - "progressStart" - ] - }, - "body": { - "type": "object", - "properties": { - "progressId": { - "type": "string", - "description": "An ID that must be used in subsequent 'progressUpdate' and 'progressEnd' events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." - }, - "title": { - "type": "string", - "description": "Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation." - }, - "requestId": { - "type": "integer", - "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit\nprogress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." - }, - "cancellable": { - "type": "boolean", - "description": "If true, the request that reports progress may be canceled with a 'cancel' request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." - }, - "message": { - "type": "string", - "description": "Optional, more detailed progress message." - }, - "percentage": { - "type": "number", - "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." - } - }, - "required": [ - "progressId", - "title" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "ProgressUpdateEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event signals that the progress reporting needs to updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", - "properties": { - "event": { - "type": "string", - "enum": [ - "progressUpdate" - ] - }, - "body": { - "type": "object", - "properties": { - "progressId": { - "type": "string", - "description": "The ID that was introduced in the initial 'progressStart' event." - }, - "message": { - "type": "string", - "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." - }, - "percentage": { - "type": "number", - "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." - } - }, - "required": [ - "progressId" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "ProgressEndEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "The event signals the end of the progress reporting with an optional final message.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", - "properties": { - "event": { - "type": "string", - "enum": [ - "progressEnd" - ] - }, - "body": { - "type": "object", - "properties": { - "progressId": { - "type": "string", - "description": "The ID that was introduced in the initial 'ProgressStartEvent'." - }, - "message": { - "type": "string", - "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." - } - }, - "required": [ - "progressId" - ] - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "InvalidatedEvent": { - "allOf": [ - { - "$ref": "#/definitions/Event" - }, - { - "type": "object", - "description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.\nThis event should only be sent if the debug adapter has received a value true for the 'supportsInvalidatedEvent' capability of the 'initialize' request.", - "properties": { - "event": { - "type": "string", - "enum": [ - "invalidated" - ] - }, - "body": { - "type": "object", - "properties": { - "areas": { - "type": "array", - "description": "Optional set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honouring the areas but there are no guarantees. If this property is missing, empty, or if values are not understand the client should assume a single value 'all'.", - "items": { - "$ref": "#/definitions/InvalidatedAreas" - } - }, - "threadId": { - "type": "integer", - "description": "If specified, the client only needs to refetch data related to this thread." - }, - "stackFrameId": { - "type": "integer", - "description": "If specified, the client only needs to refetch data related to this stack frame (and the 'threadId' is ignored)." - } - } - } - }, - "required": [ - "event", - "body" - ] - } - ] - }, - "RunInTerminalRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "title": "Reverse Requests", - "description": "This optional request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the client has passed the value true for the 'supportsRunInTerminalRequest' capability of the 'initialize' request.", - "properties": { - "command": { - "type": "string", - "enum": [ - "runInTerminal" - ] - }, - "arguments": { - "$ref": "#/definitions/RunInTerminalRequestArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "RunInTerminalRequestArguments": { - "type": "object", - "description": "Arguments for 'runInTerminal' request.", - "properties": { - "kind": { - "type": "string", - "enum": [ - "integrated", - "external" - ], - "description": "What kind of terminal to launch." - }, - "title": { - "type": "string", - "description": "Optional title of the terminal." - }, - "cwd": { - "type": "string", - "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." - }, - "args": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of arguments. The first argument is the command to run." - }, - "env": { - "type": "object", - "description": "Environment key-value pairs that are added to or removed from the default environment.", - "additionalProperties": { - "type": [ - "string", - "null" - ], - "description": "Proper values must be strings. A value of 'null' removes the variable from the environment." - } - } - }, - "required": [ - "args", - "cwd" - ] - }, - "RunInTerminalResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'runInTerminal' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "processId": { - "type": "integer", - "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." - }, - "shellProcessId": { - "type": "integer", - "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." - } - } - } - }, - "required": [ - "body" - ] - } - ] - }, - "InitializeRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "title": "Requests", - "description": "The 'initialize' request is sent as the first request from the client to the debug adapter\nin order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded to with an 'initialize' response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an 'initialize' response.\nThe 'initialize' request may only be sent once.", - "properties": { - "command": { - "type": "string", - "enum": [ - "initialize" - ] - }, - "arguments": { - "$ref": "#/definitions/InitializeRequestArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "InitializeRequestArguments": { - "type": "object", - "description": "Arguments for 'initialize' request.", - "properties": { - "clientID": { - "type": "string", - "description": "The ID of the (frontend) client using this adapter." - }, - "clientName": { - "type": "string", - "description": "The human readable name of the (frontend) client using this adapter." - }, - "adapterID": { - "type": "string", - "description": "The ID of the debug adapter." - }, - "locale": { - "type": "string", - "description": "The ISO-639 locale of the (frontend) client using this adapter, e.g. en-US or de-CH." - }, - "linesStartAt1": { - "type": "boolean", - "description": "If true all line numbers are 1-based (default)." - }, - "columnsStartAt1": { - "type": "boolean", - "description": "If true all column numbers are 1-based (default)." - }, - "pathFormat": { - "type": "string", - "_enum": [ - "path", - "uri" - ], - "description": "Determines in what format paths are specified. The default is 'path', which is the native format." - }, - "supportsVariableType": { - "type": "boolean", - "description": "Client supports the optional type attribute for variables." - }, - "supportsVariablePaging": { - "type": "boolean", - "description": "Client supports the paging of variables." - }, - "supportsRunInTerminalRequest": { - "type": "boolean", - "description": "Client supports the runInTerminal request." - }, - "supportsMemoryReferences": { - "type": "boolean", - "description": "Client supports memory references." - }, - "supportsProgressReporting": { - "type": "boolean", - "description": "Client supports progress reporting." - }, - "supportsInvalidatedEvent": { - "type": "boolean", - "description": "Client supports the invalidated event." - } - }, - "required": [ - "adapterID" - ] - }, - "InitializeResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'initialize' request.", - "properties": { - "body": { - "$ref": "#/definitions/Capabilities", - "description": "The capabilities of this debug adapter." - } - } - } - ] - }, - "ConfigurationDoneRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "This optional request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the 'initialized' event).\nClients should only call this request if the capability 'supportsConfigurationDoneRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "configurationDone" - ] - }, - "arguments": { - "$ref": "#/definitions/ConfigurationDoneArguments" - } - }, - "required": [ - "command" - ] - } - ] - }, - "ConfigurationDoneArguments": { - "type": "object", - "description": "Arguments for 'configurationDone' request." - }, - "ConfigurationDoneResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'configurationDone' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "LaunchRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if 'noDebug' is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.", - "properties": { - "command": { - "type": "string", - "enum": [ - "launch" - ] - }, - "arguments": { - "$ref": "#/definitions/LaunchRequestArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "LaunchRequestArguments": { - "type": "object", - "description": "Arguments for 'launch' request. Additional attributes are implementation specific.", - "properties": { - "noDebug": { - "type": "boolean", - "description": "If noDebug is true the launch request should launch the program without enabling debugging." - }, - "__restart": { - "type": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ], - "description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact." - } - } - }, - "LaunchResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'launch' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "AttachRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The attach request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.", - "properties": { - "command": { - "type": "string", - "enum": [ - "attach" - ] - }, - "arguments": { - "$ref": "#/definitions/AttachRequestArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "AttachRequestArguments": { - "type": "object", - "description": "Arguments for 'attach' request. Additional attributes are implementation specific.", - "properties": { - "__restart": { - "type": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ], - "description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact." - } - } - }, - "AttachResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'attach' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "RestartRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Restarts a debug session. Clients should only call this request if the capability 'supportsRestartRequest' is true.\nIf the capability is missing or has the value false, a typical client will emulate 'restart' by terminating the debug adapter first and then launching it anew.", - "properties": { - "command": { - "type": "string", - "enum": [ - "restart" - ] - }, - "arguments": { - "$ref": "#/definitions/RestartArguments" - } - }, - "required": [ - "command" - ] - } - ] - }, - "RestartArguments": { - "type": "object", - "description": "Arguments for 'restart' request.", - "properties": { - "arguments": { - "oneOf": [ - { - "$ref": "#/definitions/LaunchRequestArguments" - }, - { - "$ref": "#/definitions/AttachRequestArguments" - } - ], - "description": "The latest version of the 'launch' or 'attach' configuration." - } - } - }, - "RestartResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'restart' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "DisconnectRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging.\nIt asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter.\nIf the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the debuggee.\nIf the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the debuggee.\nThis behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug adapter).", - "properties": { - "command": { - "type": "string", - "enum": [ - "disconnect" - ] - }, - "arguments": { - "$ref": "#/definitions/DisconnectArguments" - } - }, - "required": [ - "command" - ] - } - ] - }, - "DisconnectArguments": { - "type": "object", - "description": "Arguments for 'disconnect' request.", - "properties": { - "restart": { - "type": "boolean", - "description": "A value of true indicates that this 'disconnect' request is part of a restart sequence." - }, - "terminateDebuggee": { - "type": "boolean", - "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the capability 'supportTerminateDebuggee' is true." - }, - "suspendDebuggee": { - "type": "boolean", - "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the capability 'supportSuspendDebuggee' is true." - } - } - }, - "DisconnectResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'disconnect' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "TerminateRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself.\nClients should only call this request if the capability 'supportsTerminateRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "terminate" - ] - }, - "arguments": { - "$ref": "#/definitions/TerminateArguments" - } - }, - "required": [ - "command" - ] - } - ] - }, - "TerminateArguments": { - "type": "object", - "description": "Arguments for 'terminate' request.", - "properties": { - "restart": { - "type": "boolean", - "description": "A value of true indicates that this 'terminate' request is part of a restart sequence." - } - } - }, - "TerminateResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'terminate' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "BreakpointLocationsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range.\nClients should only call this request if the capability 'supportsBreakpointLocationsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "breakpointLocations" - ] - }, - "arguments": { - "$ref": "#/definitions/BreakpointLocationsArguments" - } - }, - "required": [ - "command" - ] - } - ] - }, - "BreakpointLocationsArguments": { - "type": "object", - "description": "Arguments for 'breakpointLocations' request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified." - }, - "line": { - "type": "integer", - "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line." - }, - "column": { - "type": "integer", - "description": "Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed." - }, - "endLine": { - "type": "integer", - "description": "Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line." - }, - "endColumn": { - "type": "integer", - "description": "Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line." - } - }, - "required": [ - "source", - "line" - ] - }, - "BreakpointLocationsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'breakpointLocations' request.\nContains possible locations for source breakpoints.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/BreakpointLocation" - }, - "description": "Sorted set of possible breakpoint locations." - } - }, - "required": [ - "breakpoints" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "SetBreakpointsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.\nTo clear all breakpoint for a source, specify an empty array.\nWhen a breakpoint is hit, a 'stopped' event (with reason 'breakpoint') is generated.", - "properties": { - "command": { - "type": "string", - "enum": [ - "setBreakpoints" - ] - }, - "arguments": { - "$ref": "#/definitions/SetBreakpointsArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "SetBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setBreakpoints' request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified." - }, - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/SourceBreakpoint" - }, - "description": "The code locations of the breakpoints." - }, - "lines": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Deprecated: The code locations of the breakpoints." - }, - "sourceModified": { - "type": "boolean", - "description": "A value of true indicates that the underlying source has been modified which results in new breakpoint locations." - } - }, - "required": [ - "source" - ] - }, - "SetBreakpointsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'setBreakpoints' request.\nReturned is information about each breakpoint created by this request.\nThis includes the actual code location and whether the breakpoint could be verified.\nThe breakpoints returned are in the same order as the elements of the 'breakpoints'\n(or the deprecated 'lines') array in the arguments.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." - } - }, - "required": [ - "breakpoints" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "SetFunctionBreakpointsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated.\nClients should only call this request if the capability 'supportsFunctionBreakpoints' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "setFunctionBreakpoints" - ] - }, - "arguments": { - "$ref": "#/definitions/SetFunctionBreakpointsArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "SetFunctionBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setFunctionBreakpoints' request.", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/FunctionBreakpoint" - }, - "description": "The function names of the breakpoints." - } - }, - "required": [ - "breakpoints" - ] - }, - "SetFunctionBreakpointsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'setFunctionBreakpoints' request.\nReturned is information about each breakpoint created by this request.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." - } - }, - "required": [ - "breakpoints" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "SetExceptionBreakpointsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request configures the debuggers response to thrown exceptions.\nIf an exception is configured to break, a 'stopped' event is fired (with reason 'exception').\nClients should only call this request if the capability 'exceptionBreakpointFilters' returns one or more filters.", - "properties": { - "command": { - "type": "string", - "enum": [ - "setExceptionBreakpoints" - ] - }, - "arguments": { - "$ref": "#/definitions/SetExceptionBreakpointsArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "SetExceptionBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setExceptionBreakpoints' request.", - "properties": { - "filters": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the 'exceptionBreakpointFilters' capability. The 'filter' and 'filterOptions' sets are additive." - }, - "filterOptions": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionFilterOptions" - }, - "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the 'exceptionBreakpointFilters' capability. This attribute is only honored by a debug adapter if the capability 'supportsExceptionFilterOptions' is true. The 'filter' and 'filterOptions' sets are additive." - }, - "exceptionOptions": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionOptions" - }, - "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the capability 'supportsExceptionOptions' is true." - } - }, - "required": [ - "filters" - ] - }, - "SetExceptionBreakpointsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'setExceptionBreakpoints' request.\nThe response contains an array of Breakpoint objects with information about each exception breakpoint or filter. The Breakpoint objects are in the same order as the elements of the 'filters', 'filterOptions', 'exceptionOptions' arrays given as arguments. If both 'filters' and 'filterOptions' are given, the returned array must start with 'filters' information first, followed by 'filterOptions' information.\nThe mandatory 'verified' property of a Breakpoint object signals whether the exception breakpoint or filter could be successfully created and whether the optional condition or hit count expressions are valid. In case of an error the 'message' property explains the problem. An optional 'id' property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.\nFor backward compatibility both the 'breakpoints' array and the enclosing 'body' are optional. If these elements are missing a client will not be able to show problems for individual exception breakpoints or filters.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the 'filters', 'filterOptions', 'exceptionOptions' arrays in the arguments. If both 'filters' and 'filterOptions' are given, the returned array must start with 'filters' information first, followed by 'filterOptions' information." - } - } - } - } - } - ] - }, - "DataBreakpointInfoRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "dataBreakpointInfo" - ] - }, - "arguments": { - "$ref": "#/definitions/DataBreakpointInfoArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "DataBreakpointInfoArguments": { - "type": "object", - "description": "Arguments for 'dataBreakpointInfo' request.", - "properties": { - "variablesReference": { - "type": "integer", - "description": "Reference to the Variable container if the data breakpoint is requested for a child of the container." - }, - "name": { - "type": "string", - "description": "The name of the Variable's child to obtain data breakpoint information for.\nIf variablesReference isn’t provided, this can be an expression." - } - }, - "required": [ - "name" - ] - }, - "DataBreakpointInfoResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'dataBreakpointInfo' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "dataId": { - "type": [ - "string", - "null" - ], - "description": "An identifier for the data on which a data breakpoint can be registered with the setDataBreakpoints request or null if no data breakpoint is available." - }, - "description": { - "type": "string", - "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." - }, - "accessTypes": { - "type": "array", - "items": { - "$ref": "#/definitions/DataBreakpointAccessType" - }, - "description": "Optional attribute listing the available access types for a potential data breakpoint. A UI frontend could surface this information." - }, - "canPersist": { - "type": "boolean", - "description": "Optional attribute indicating that a potential data breakpoint could be persisted across sessions." - } - }, - "required": [ - "dataId", - "description" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "SetDataBreakpointsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "setDataBreakpoints" - ] - }, - "arguments": { - "$ref": "#/definitions/SetDataBreakpointsArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "SetDataBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setDataBreakpoints' request.", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/DataBreakpoint" - }, - "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." - } - }, - "required": [ - "breakpoints" - ] - }, - "SetDataBreakpointsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'setDataBreakpoints' request.\nReturned is information about each breakpoint created by this request.", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument 'breakpoints' array." - } - }, - "required": [ - "breakpoints" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "SetInstructionBreakpointsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a 'stopped' event (with reason 'instruction breakpoint') is generated.\nClients should only call this request if the capability 'supportsInstructionBreakpoints' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "setInstructionBreakpoints" - ] - }, - "arguments": { - "$ref": "#/definitions/SetInstructionBreakpointsArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "SetInstructionBreakpointsArguments": { - "type": "object", - "description": "Arguments for 'setInstructionBreakpoints' request", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/InstructionBreakpoint" - }, - "description": "The instruction references of the breakpoints" - } - }, - "required": [ - "breakpoints" - ] - }, - "SetInstructionBreakpointsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'setInstructionBreakpoints' request", - "properties": { - "body": { - "type": "object", - "properties": { - "breakpoints": { - "type": "array", - "items": { - "$ref": "#/definitions/Breakpoint" - }, - "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." - } - }, - "required": [ - "breakpoints" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "ContinueRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request starts the debuggee to run again.", - "properties": { - "command": { - "type": "string", - "enum": [ - "continue" - ] - }, - "arguments": { - "$ref": "#/definitions/ContinueArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "ContinueArguments": { - "type": "object", - "description": "Arguments for 'continue' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Continue execution for the specified thread (if possible).\nIf the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true." - } - }, - "required": [ - "threadId" - ] - }, - "ContinueResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'continue' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "allThreadsContinued": { - "type": "boolean", - "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead.\nIf this attribute is missing a value of 'true' is assumed for backward compatibility." - } - } - } - }, - "required": [ - "body" - ] - } - ] - }, - "NextRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request starts the debuggee to run again for one step.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.", - "properties": { - "command": { - "type": "string", - "enum": [ - "next" - ] - }, - "arguments": { - "$ref": "#/definitions/NextArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "NextArguments": { - "type": "object", - "description": "Arguments for 'next' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'next' for this thread." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." - } - }, - "required": [ - "threadId" - ] - }, - "NextResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'next' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "StepInRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request starts the debuggee to step into a function/method if possible.\nIf it cannot step into a target, 'stepIn' behaves like 'next'.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.\nIf there are multiple function/method calls (or other targets) on the source line,\nthe optional argument 'targetId' can be used to control into which target the 'stepIn' should occur.\nThe list of possible targets for a given source line can be retrieved via the 'stepInTargets' request.", - "properties": { - "command": { - "type": "string", - "enum": [ - "stepIn" - ] - }, - "arguments": { - "$ref": "#/definitions/StepInArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "StepInArguments": { - "type": "object", - "description": "Arguments for 'stepIn' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'stepIn' for this thread." - }, - "targetId": { - "type": "integer", - "description": "Optional id of the target to step into." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." - } - }, - "required": [ - "threadId" - ] - }, - "StepInResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'stepIn' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "StepOutRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request starts the debuggee to run again for one step.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.", - "properties": { - "command": { - "type": "string", - "enum": [ - "stepOut" - ] - }, - "arguments": { - "$ref": "#/definitions/StepOutArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "StepOutArguments": { - "type": "object", - "description": "Arguments for 'stepOut' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'stepOut' for this thread." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." - } - }, - "required": [ - "threadId" - ] - }, - "StepOutResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'stepOut' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "StepBackRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request starts the debuggee to run one step backwards.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.\nClients should only call this request if the capability 'supportsStepBack' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "stepBack" - ] - }, - "arguments": { - "$ref": "#/definitions/StepBackArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "StepBackArguments": { - "type": "object", - "description": "Arguments for 'stepBack' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'stepBack' for this thread." - }, - "granularity": { - "$ref": "#/definitions/SteppingGranularity", - "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." - } - }, - "required": [ - "threadId" - ] - }, - "StepBackResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'stepBack' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "ReverseContinueRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request starts the debuggee to run backward.\nClients should only call this request if the capability 'supportsStepBack' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "reverseContinue" - ] - }, - "arguments": { - "$ref": "#/definitions/ReverseContinueArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "ReverseContinueArguments": { - "type": "object", - "description": "Arguments for 'reverseContinue' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Execute 'reverseContinue' for this thread." - } - }, - "required": [ - "threadId" - ] - }, - "ReverseContinueResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'reverseContinue' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "RestartFrameRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request restarts execution of the specified stackframe.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'restart') after the restart has completed.\nClients should only call this request if the capability 'supportsRestartFrame' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "restartFrame" - ] - }, - "arguments": { - "$ref": "#/definitions/RestartFrameArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "RestartFrameArguments": { - "type": "object", - "description": "Arguments for 'restartFrame' request.", - "properties": { - "frameId": { - "type": "integer", - "description": "Restart this stackframe." - } - }, - "required": [ - "frameId" - ] - }, - "RestartFrameResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'restartFrame' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "GotoRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to executed code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a 'stopped' event with reason 'goto'.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true (because only then goto targets exist that can be passed as arguments).", - "properties": { - "command": { - "type": "string", - "enum": [ - "goto" - ] - }, - "arguments": { - "$ref": "#/definitions/GotoArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "GotoArguments": { - "type": "object", - "description": "Arguments for 'goto' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Set the goto target for this thread." - }, - "targetId": { - "type": "integer", - "description": "The location where the debuggee will continue to run." - } - }, - "required": [ - "threadId", - "targetId" - ] - }, - "GotoResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'goto' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "PauseRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request suspends the debuggee.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'pause') after the thread has been paused successfully.", - "properties": { - "command": { - "type": "string", - "enum": [ - "pause" - ] - }, - "arguments": { - "$ref": "#/definitions/PauseArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "PauseArguments": { - "type": "object", - "description": "Arguments for 'pause' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Pause execution for this thread." - } - }, - "required": [ - "threadId" - ] - }, - "PauseResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'pause' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "StackTraceRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' capability is true, stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached.", - "properties": { - "command": { - "type": "string", - "enum": [ - "stackTrace" - ] - }, - "arguments": { - "$ref": "#/definitions/StackTraceArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "StackTraceArguments": { - "type": "object", - "description": "Arguments for 'stackTrace' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Retrieve the stacktrace for this thread." - }, - "startFrame": { - "type": "integer", - "description": "The index of the first frame to return; if omitted frames start at 0." - }, - "levels": { - "type": "integer", - "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." - }, - "format": { - "$ref": "#/definitions/StackFrameFormat", - "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." - } - }, - "required": [ - "threadId" - ] - }, - "StackTraceResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'stackTrace' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "stackFrames": { - "type": "array", - "items": { - "$ref": "#/definitions/StackFrame" - }, - "description": "The frames of the stackframe. If the array has length zero, there are no stackframes available.\nThis means that there is no location information available." - }, - "totalFrames": { - "type": "integer", - "description": "The total number of frames available in the stack. If omitted or if totalFrames is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing totalFrames values for subsequent requests can be used to enforce paging in the client." - } - }, - "required": [ - "stackFrames" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "ScopesRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request returns the variable scopes for a given stackframe ID.", - "properties": { - "command": { - "type": "string", - "enum": [ - "scopes" - ] - }, - "arguments": { - "$ref": "#/definitions/ScopesArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "ScopesArguments": { - "type": "object", - "description": "Arguments for 'scopes' request.", - "properties": { - "frameId": { - "type": "integer", - "description": "Retrieve the scopes for this stackframe." - } - }, - "required": [ - "frameId" - ] - }, - "ScopesResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'scopes' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "scopes": { - "type": "array", - "items": { - "$ref": "#/definitions/Scope" - }, - "description": "The scopes of the stackframe. If the array has length zero, there are no scopes available." - } - }, - "required": [ - "scopes" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "VariablesRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Retrieves all child variables for the given variable reference.\nAn optional filter can be used to limit the fetched children to either named or indexed children.", - "properties": { - "command": { - "type": "string", - "enum": [ - "variables" - ] - }, - "arguments": { - "$ref": "#/definitions/VariablesArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "VariablesArguments": { - "type": "object", - "description": "Arguments for 'variables' request.", - "properties": { - "variablesReference": { - "type": "integer", - "description": "The Variable reference." - }, - "filter": { - "type": "string", - "enum": [ - "indexed", - "named" - ], - "description": "Optional filter to limit the child variables to either named or indexed. If omitted, both types are fetched." - }, - "start": { - "type": "integer", - "description": "The index of the first variable to return; if omitted children start at 0." - }, - "count": { - "type": "integer", - "description": "The number of variables to return. If count is missing or 0, all variables are returned." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." - } - }, - "required": [ - "variablesReference" - ] - }, - "VariablesResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'variables' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "variables": { - "type": "array", - "items": { - "$ref": "#/definitions/Variable" - }, - "description": "All (or a range) of variables for the given variable reference." - } - }, - "required": [ - "variables" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "SetVariableRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the capability 'supportsSetVariable' is true.\nIf a debug adapter implements both setVariable and setExpression, a client will only use setExpression if the variable has an evaluateName property.", - "properties": { - "command": { - "type": "string", - "enum": [ - "setVariable" - ] - }, - "arguments": { - "$ref": "#/definitions/SetVariableArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "SetVariableArguments": { - "type": "object", - "description": "Arguments for 'setVariable' request.", - "properties": { - "variablesReference": { - "type": "integer", - "description": "The reference of the variable container." - }, - "name": { - "type": "string", - "description": "The name of the variable in the container." - }, - "value": { - "type": "string", - "description": "The value of the variable." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the response value." - } - }, - "required": [ - "variablesReference", - "name", - "value" - ] - }, - "SetVariableResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'setVariable' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The new value of the variable." - }, - "type": { - "type": "string", - "description": "The type of the new value. Typically shown in the UI when hovering over the value." - }, - "variablesReference": { - "type": "integer", - "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - } - }, - "required": [ - "value" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "SourceRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request retrieves the source code for a given source reference.", - "properties": { - "command": { - "type": "string", - "enum": [ - "source" - ] - }, - "arguments": { - "$ref": "#/definitions/SourceArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "SourceArguments": { - "type": "object", - "description": "Arguments for 'source' request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "Specifies the source content to load. Either source.path or source.sourceReference must be specified." - }, - "sourceReference": { - "type": "integer", - "description": "The reference to the source. This is the same as source.sourceReference.\nThis is provided for backward compatibility since old backends do not understand the 'source' attribute." - } - }, - "required": [ - "sourceReference" - ] - }, - "SourceResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'source' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "content": { - "type": "string", - "description": "Content of the source reference." - }, - "mimeType": { - "type": "string", - "description": "Optional content type (mime type) of the source." - } - }, - "required": [ - "content" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "ThreadsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request retrieves a list of all threads.", - "properties": { - "command": { - "type": "string", - "enum": [ - "threads" - ] - } - }, - "required": [ - "command" - ] - } - ] - }, - "ThreadsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'threads' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "threads": { - "type": "array", - "items": { - "$ref": "#/definitions/Thread" - }, - "description": "All threads." - } - }, - "required": [ - "threads" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "TerminateThreadsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "The request terminates the threads with the given ids.\nClients should only call this request if the capability 'supportsTerminateThreadsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "terminateThreads" - ] - }, - "arguments": { - "$ref": "#/definitions/TerminateThreadsArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "TerminateThreadsArguments": { - "type": "object", - "description": "Arguments for 'terminateThreads' request.", - "properties": { - "threadIds": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Ids of threads to be terminated." - } - } - }, - "TerminateThreadsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'terminateThreads' request. This is just an acknowledgement, so no body field is required." - } - ] - }, - "ModulesRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.\nClients should only call this request if the capability 'supportsModulesRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "modules" - ] - }, - "arguments": { - "$ref": "#/definitions/ModulesArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "ModulesArguments": { - "type": "object", - "description": "Arguments for 'modules' request.", - "properties": { - "startModule": { - "type": "integer", - "description": "The index of the first module to return; if omitted modules start at 0." - }, - "moduleCount": { - "type": "integer", - "description": "The number of modules to return. If moduleCount is not specified or 0, all modules are returned." - } - } - }, - "ModulesResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'modules' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "modules": { - "type": "array", - "items": { - "$ref": "#/definitions/Module" - }, - "description": "All modules or range of modules." - }, - "totalModules": { - "type": "integer", - "description": "The total number of modules available." - } - }, - "required": [ - "modules" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "LoadedSourcesRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Retrieves the set of all sources currently loaded by the debugged process.\nClients should only call this request if the capability 'supportsLoadedSourcesRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "loadedSources" - ] - }, - "arguments": { - "$ref": "#/definitions/LoadedSourcesArguments" - } - }, - "required": [ - "command" - ] - } - ] - }, - "LoadedSourcesArguments": { - "type": "object", - "description": "Arguments for 'loadedSources' request." - }, - "LoadedSourcesResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'loadedSources' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "sources": { - "type": "array", - "items": { - "$ref": "#/definitions/Source" - }, - "description": "Set of loaded sources." - } - }, - "required": [ - "sources" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "EvaluateRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Evaluates the given expression in the context of the top most stack frame.\nThe expression has access to any variables and arguments that are in scope.", - "properties": { - "command": { - "type": "string", - "enum": [ - "evaluate" - ] - }, - "arguments": { - "$ref": "#/definitions/EvaluateArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "EvaluateArguments": { - "type": "object", - "description": "Arguments for 'evaluate' request.", - "properties": { - "expression": { - "type": "string", - "description": "The expression to evaluate." - }, - "frameId": { - "type": "integer", - "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope." - }, - "context": { - "type": "string", - "_enum": [ - "watch", - "repl", - "hover", - "clipboard" - ], - "enumDescriptions": [ - "evaluate is run in a watch.", - "evaluate is run from REPL console.", - "evaluate is run from a data hover.", - "evaluate is run to generate the value that will be stored in the clipboard.\nThe attribute is only honored by a debug adapter if the capability 'supportsClipboardContext' is true." - ], - "description": "The context in which the evaluate request is run." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies details on how to format the Evaluate result.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." - } - }, - "required": [ - "expression" - ] - }, - "EvaluateResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'evaluate' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "result": { - "type": "string", - "description": "The result of the evaluate request." - }, - "type": { - "type": "string", - "description": "The optional type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." - }, - "presentationHint": { - "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of a evaluate result that can be used to determine how to render the result in the UI." - }, - "variablesReference": { - "type": "integer", - "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "memoryReference": { - "type": "string", - "description": "Optional memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute should be returned by a debug adapter if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." - } - }, - "required": [ - "result", - "variablesReference" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "SetExpressionRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Evaluates the given 'value' expression and assigns it to the 'expression' which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the capability 'supportsSetExpression' is true.\nIf a debug adapter implements both setExpression and setVariable, a client will only use setExpression if the variable has an evaluateName property.", - "properties": { - "command": { - "type": "string", - "enum": [ - "setExpression" - ] - }, - "arguments": { - "$ref": "#/definitions/SetExpressionArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "SetExpressionArguments": { - "type": "object", - "description": "Arguments for 'setExpression' request.", - "properties": { - "expression": { - "type": "string", - "description": "The l-value expression to assign to." - }, - "value": { - "type": "string", - "description": "The value expression to assign to the l-value expression." - }, - "frameId": { - "type": "integer", - "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope." - }, - "format": { - "$ref": "#/definitions/ValueFormat", - "description": "Specifies how the resulting value should be formatted." - } - }, - "required": [ - "expression", - "value" - ] - }, - "SetExpressionResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'setExpression' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The new value of the expression." - }, - "type": { - "type": "string", - "description": "The optional type of the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." - }, - "presentationHint": { - "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of a value that can be used to determine how to render the result in the UI." - }, - "variablesReference": { - "type": "integer", - "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." - } - }, - "required": [ - "value" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "StepInTargetsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "This request retrieves the possible stepIn targets for the specified stack frame.\nThese targets can be used in the 'stepIn' request.\nThe StepInTargets may only be called if the 'supportsStepInTargetsRequest' capability exists and is true.\nClients should only call this request if the capability 'supportsStepInTargetsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "stepInTargets" - ] - }, - "arguments": { - "$ref": "#/definitions/StepInTargetsArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "StepInTargetsArguments": { - "type": "object", - "description": "Arguments for 'stepInTargets' request.", - "properties": { - "frameId": { - "type": "integer", - "description": "The stack frame for which to retrieve the possible stepIn targets." - } - }, - "required": [ - "frameId" - ] - }, - "StepInTargetsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'stepInTargets' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/StepInTarget" - }, - "description": "The possible stepIn targets of the specified source location." - } - }, - "required": [ - "targets" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "GotoTargetsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the 'goto' request.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "gotoTargets" - ] - }, - "arguments": { - "$ref": "#/definitions/GotoTargetsArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "GotoTargetsArguments": { - "type": "object", - "description": "Arguments for 'gotoTargets' request.", - "properties": { - "source": { - "$ref": "#/definitions/Source", - "description": "The source location for which the goto targets are determined." - }, - "line": { - "type": "integer", - "description": "The line location for which the goto targets are determined." - }, - "column": { - "type": "integer", - "description": "An optional column location for which the goto targets are determined." - } - }, - "required": [ - "source", - "line" - ] - }, - "GotoTargetsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'gotoTargets' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/GotoTarget" - }, - "description": "The possible goto targets of the specified location." - } - }, - "required": [ - "targets" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "CompletionsRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Returns a list of possible completions for a given caret position and text.\nClients should only call this request if the capability 'supportsCompletionsRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "completions" - ] - }, - "arguments": { - "$ref": "#/definitions/CompletionsArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "CompletionsArguments": { - "type": "object", - "description": "Arguments for 'completions' request.", - "properties": { - "frameId": { - "type": "integer", - "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope." - }, - "text": { - "type": "string", - "description": "One or more source lines. Typically this is the text a user has typed into the debug console before he asked for completion." - }, - "column": { - "type": "integer", - "description": "The character position for which to determine the completion proposals." - }, - "line": { - "type": "integer", - "description": "An optional line for which to determine the completion proposals. If missing the first line of the text is assumed." - } - }, - "required": [ - "text", - "column" - ] - }, - "CompletionsResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'completions' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/CompletionItem" - }, - "description": "The possible completions for ." - } - }, - "required": [ - "targets" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "ExceptionInfoRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Retrieves the details of the exception that caused this event to be raised.\nClients should only call this request if the capability 'supportsExceptionInfoRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "exceptionInfo" - ] - }, - "arguments": { - "$ref": "#/definitions/ExceptionInfoArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "ExceptionInfoArguments": { - "type": "object", - "description": "Arguments for 'exceptionInfo' request.", - "properties": { - "threadId": { - "type": "integer", - "description": "Thread for which exception information should be retrieved." - } - }, - "required": [ - "threadId" - ] - }, - "ExceptionInfoResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'exceptionInfo' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "exceptionId": { - "type": "string", - "description": "ID of the exception that was thrown." - }, - "description": { - "type": "string", - "description": "Descriptive text for the exception provided by the debug adapter." - }, - "breakMode": { - "$ref": "#/definitions/ExceptionBreakMode", - "description": "Mode that caused the exception notification to be raised." - }, - "details": { - "$ref": "#/definitions/ExceptionDetails", - "description": "Detailed information about the exception." - } - }, - "required": [ - "exceptionId", - "breakMode" - ] - } - }, - "required": [ - "body" - ] - } - ] - }, - "ReadMemoryRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Reads bytes from memory at the provided location.\nClients should only call this request if the capability 'supportsReadMemoryRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "readMemory" - ] - }, - "arguments": { - "$ref": "#/definitions/ReadMemoryArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "ReadMemoryArguments": { - "type": "object", - "description": "Arguments for 'readMemory' request.", - "properties": { - "memoryReference": { - "type": "string", - "description": "Memory reference to the base location from which data should be read." - }, - "offset": { - "type": "integer", - "description": "Optional offset (in bytes) to be applied to the reference location before reading data. Can be negative." - }, - "count": { - "type": "integer", - "description": "Number of bytes to read at the specified location and offset." - } - }, - "required": [ - "memoryReference", - "count" - ] - }, - "ReadMemoryResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'readMemory' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "address": { - "type": "string", - "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with '0x', or as a decimal value otherwise." - }, - "unreadableBytes": { - "type": "integer", - "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." - }, - "data": { - "type": "string", - "description": "The bytes read from memory, encoded using base64." - } - }, - "required": [ - "address" - ] - } - } - } - ] - }, - "DisassembleRequest": { - "allOf": [ - { - "$ref": "#/definitions/Request" - }, - { - "type": "object", - "description": "Disassembles code stored at the provided location.\nClients should only call this request if the capability 'supportsDisassembleRequest' is true.", - "properties": { - "command": { - "type": "string", - "enum": [ - "disassemble" - ] - }, - "arguments": { - "$ref": "#/definitions/DisassembleArguments" - } - }, - "required": [ - "command", - "arguments" - ] - } - ] - }, - "DisassembleArguments": { - "type": "object", - "description": "Arguments for 'disassemble' request.", - "properties": { - "memoryReference": { - "type": "string", - "description": "Memory reference to the base location containing the instructions to disassemble." - }, - "offset": { - "type": "integer", - "description": "Optional offset (in bytes) to be applied to the reference location before disassembling. Can be negative." - }, - "instructionOffset": { - "type": "integer", - "description": "Optional offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative." - }, - "instructionCount": { - "type": "integer", - "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." - }, - "resolveSymbols": { - "type": "boolean", - "description": "If true, the adapter should attempt to resolve memory addresses and other values to symbolic names." - } - }, - "required": [ - "memoryReference", - "instructionCount" - ] - }, - "DisassembleResponse": { - "allOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "type": "object", - "description": "Response to 'disassemble' request.", - "properties": { - "body": { - "type": "object", - "properties": { - "instructions": { - "type": "array", - "items": { - "$ref": "#/definitions/DisassembledInstruction" - }, - "description": "The list of disassembled instructions." - } - }, - "required": [ - "instructions" - ] - } - } - } - ] - }, - "Capabilities": { - "type": "object", - "title": "Types", - "description": "Information about the capabilities of a debug adapter.", - "properties": { - "supportsConfigurationDoneRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'configurationDone' request." - }, - "supportsFunctionBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports function breakpoints." - }, - "supportsConditionalBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports conditional breakpoints." - }, - "supportsHitConditionalBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports breakpoints that break execution after a specified number of hits." - }, - "supportsEvaluateForHovers": { - "type": "boolean", - "description": "The debug adapter supports a (side effect free) evaluate request for data hovers." - }, - "exceptionBreakpointFilters": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionBreakpointsFilter" - }, - "description": "Available exception filter options for the 'setExceptionBreakpoints' request." - }, - "supportsStepBack": { - "type": "boolean", - "description": "The debug adapter supports stepping back via the 'stepBack' and 'reverseContinue' requests." - }, - "supportsSetVariable": { - "type": "boolean", - "description": "The debug adapter supports setting a variable to a value." - }, - "supportsRestartFrame": { - "type": "boolean", - "description": "The debug adapter supports restarting a frame." - }, - "supportsGotoTargetsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'gotoTargets' request." - }, - "supportsStepInTargetsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'stepInTargets' request." - }, - "supportsCompletionsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'completions' request." - }, - "completionTriggerCharacters": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the '.' character." - }, - "supportsModulesRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'modules' request." - }, - "additionalModuleColumns": { - "type": "array", - "items": { - "$ref": "#/definitions/ColumnDescriptor" - }, - "description": "The set of additional module information exposed by the debug adapter." - }, - "supportedChecksumAlgorithms": { - "type": "array", - "items": { - "$ref": "#/definitions/ChecksumAlgorithm" - }, - "description": "Checksum algorithms supported by the debug adapter." - }, - "supportsRestartRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'restart' request. In this case a client should not implement 'restart' by terminating and relaunching the adapter but by calling the RestartRequest." - }, - "supportsExceptionOptions": { - "type": "boolean", - "description": "The debug adapter supports 'exceptionOptions' on the setExceptionBreakpoints request." - }, - "supportsValueFormattingOptions": { - "type": "boolean", - "description": "The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest." - }, - "supportsExceptionInfoRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'exceptionInfo' request." - }, - "supportTerminateDebuggee": { - "type": "boolean", - "description": "The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request." - }, - "supportSuspendDebuggee": { - "type": "boolean", - "description": "The debug adapter supports the 'suspendDebuggee' attribute on the 'disconnect' request." - }, - "supportsDelayedStackTraceLoading": { - "type": "boolean", - "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported." - }, - "supportsLoadedSourcesRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'loadedSources' request." - }, - "supportsLogPoints": { - "type": "boolean", - "description": "The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint." - }, - "supportsTerminateThreadsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'terminateThreads' request." - }, - "supportsSetExpression": { - "type": "boolean", - "description": "The debug adapter supports the 'setExpression' request." - }, - "supportsTerminateRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'terminate' request." - }, - "supportsDataBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports data breakpoints." - }, - "supportsReadMemoryRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'readMemory' request." - }, - "supportsDisassembleRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'disassemble' request." - }, - "supportsCancelRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'cancel' request." - }, - "supportsBreakpointLocationsRequest": { - "type": "boolean", - "description": "The debug adapter supports the 'breakpointLocations' request." - }, - "supportsClipboardContext": { - "type": "boolean", - "description": "The debug adapter supports the 'clipboard' context value in the 'evaluate' request." - }, - "supportsSteppingGranularity": { - "type": "boolean", - "description": "The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests." - }, - "supportsInstructionBreakpoints": { - "type": "boolean", - "description": "The debug adapter supports adding breakpoints based on instruction references." - }, - "supportsExceptionFilterOptions": { - "type": "boolean", - "description": "The debug adapter supports 'filterOptions' as an argument on the 'setExceptionBreakpoints' request." - } - } - }, - "ExceptionBreakpointsFilter": { - "type": "object", - "description": "An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions are dealt with.", - "properties": { - "filter": { - "type": "string", - "description": "The internal ID of the filter option. This value is passed to the 'setExceptionBreakpoints' request." - }, - "label": { - "type": "string", - "description": "The name of the filter option. This will be shown in the UI." - }, - "description": { - "type": "string", - "description": "An optional help text providing additional information about the exception filter. This string is typically shown as a hover and must be translated." - }, - "default": { - "type": "boolean", - "description": "Initial value of the filter option. If not specified a value 'false' is assumed." - }, - "supportsCondition": { - "type": "boolean", - "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." - }, - "conditionDescription": { - "type": "string", - "description": "An optional help text providing information about the condition. This string is shown as the placeholder text for a text box and must be translated." - } - }, - "required": [ - "filter", - "label" - ] - }, - "Message": { - "type": "object", - "description": "A structured message object. Used to return errors from requests.", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for the message." - }, - "format": { - "type": "string", - "description": "A format string for the message. Embedded variables have the form '{name}'.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes." - }, - "variables": { - "type": "object", - "description": "An object used as a dictionary for looking up the variables in the format string.", - "additionalProperties": { - "type": "string", - "description": "Values must be strings." - } - }, - "sendTelemetry": { - "type": "boolean", - "description": "If true send to telemetry." - }, - "showUser": { - "type": "boolean", - "description": "If true show user." - }, - "url": { - "type": "string", - "description": "An optional url where additional information about this message can be found." - }, - "urlLabel": { - "type": "string", - "description": "An optional label that is presented to the user as the UI for opening the url." - } - }, - "required": [ - "id", - "format" - ] - }, - "Module": { - "type": "object", - "description": "A Module object represents a row in the modules view.\nTwo attributes are mandatory: an id identifies a module in the modules view and is used in a ModuleEvent for identifying a module for adding, updating or deleting.\nThe name is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They will show up in the module View if they have a corresponding ColumnDescriptor.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names\nwe recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.", - "properties": { - "id": { - "type": [ - "integer", - "string" - ], - "description": "Unique identifier for the module." - }, - "name": { - "type": "string", - "description": "A name of the module." - }, - "path": { - "type": "string", - "description": "optional but recommended attributes.\nalways try to use these first before introducing additional attributes.\n\nLogical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module." - }, - "isOptimized": { - "type": "boolean", - "description": "True if the module is optimized." - }, - "isUserCode": { - "type": "boolean", - "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'." - }, - "version": { - "type": "string", - "description": "Version of Module." - }, - "symbolStatus": { - "type": "string", - "description": "User understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc." - }, - "symbolFilePath": { - "type": "string", - "description": "Logical full path to the symbol file. The exact definition is implementation defined." - }, - "dateTimeStamp": { - "type": "string", - "description": "Module created or modified." - }, - "addressRange": { - "type": "string", - "description": "Address range covered by this module." - } - }, - "required": [ - "id", - "name" - ] - }, - "ColumnDescriptor": { - "type": "object", - "description": "A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", - "properties": { - "attributeName": { - "type": "string", - "description": "Name of the attribute rendered in this column." - }, - "label": { - "type": "string", - "description": "Header UI label of column." - }, - "format": { - "type": "string", - "description": "Format to use for the rendered values in this column. TBD how the format strings looks like." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "unixTimestampUTC" - ], - "description": "Datatype of values in this column. Defaults to 'string' if not specified." - }, - "width": { - "type": "integer", - "description": "Width of this column in characters (hint only)." - } - }, - "required": [ - "attributeName", - "label" - ] - }, - "ModulesViewDescriptor": { - "type": "object", - "description": "The ModulesViewDescriptor is the container for all declarative configuration options of a ModuleView.\nFor now it only specifies the columns to be shown in the modules view.", - "properties": { - "columns": { - "type": "array", - "items": { - "$ref": "#/definitions/ColumnDescriptor" - } - } - }, - "required": [ - "columns" - ] - }, - "Thread": { - "type": "object", - "description": "A Thread", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for the thread." - }, - "name": { - "type": "string", - "description": "A name of the thread." - } - }, - "required": [ - "id", - "name" - ] - }, - "Source": { - "type": "object", - "description": "A Source is a descriptor for source code.\nIt is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.", - "properties": { - "name": { - "type": "string", - "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." - }, - "path": { - "type": "string", - "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0)." - }, - "sourceReference": { - "type": "integer", - "description": "If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified).\nA sourceReference is only valid for a session, so it must not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." - }, - "presentationHint": { - "type": "string", - "description": "An optional hint for how to present the source in the UI.\nA value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.", - "enum": [ - "normal", - "emphasize", - "deemphasize" - ] - }, - "origin": { - "type": "string", - "description": "The (optional) origin of this source: possible values 'internal module', 'inlined content from source map', etc." - }, - "sources": { - "type": "array", - "items": { - "$ref": "#/definitions/Source" - }, - "description": "An optional list of sources that are related to this source. These may be the source that generated this source." - }, - "adapterData": { - "type": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ], - "description": "Optional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." - }, - "checksums": { - "type": "array", - "items": { - "$ref": "#/definitions/Checksum" - }, - "description": "The checksums associated with this file." - } - } - }, - "StackFrame": { - "type": "object", - "description": "A Stackframe contains the source location.", - "properties": { - "id": { - "type": "integer", - "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe." - }, - "name": { - "type": "string", - "description": "The name of the stack frame, typically a method name." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The optional source of the frame." - }, - "line": { - "type": "integer", - "description": "The line within the file of the frame. If source is null or doesn't exist, line is 0 and must be ignored." - }, - "column": { - "type": "integer", - "description": "The column within the line. If source is null or doesn't exist, column is 0 and must be ignored." - }, - "endLine": { - "type": "integer", - "description": "An optional end line of the range covered by the stack frame." - }, - "endColumn": { - "type": "integer", - "description": "An optional end column of the range covered by the stack frame." - }, - "canRestart": { - "type": "boolean", - "description": "Indicates whether this frame can be restarted with the 'restart' request. Clients should only use this if the debug adapter supports the 'restart' request (capability 'supportsRestartRequest' is true)." - }, - "instructionPointerReference": { - "type": "string", - "description": "Optional memory reference for the current instruction pointer in this frame." - }, - "moduleId": { - "type": [ - "integer", - "string" - ], - "description": "The module associated with this frame, if any." - }, - "presentationHint": { - "type": "string", - "enum": [ - "normal", - "label", - "subtle" - ], - "description": "An optional hint for how to present this frame in the UI.\nA value of 'label' can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of 'subtle' can be used to change the appearance of a frame in a 'subtle' way." - } - }, - "required": [ - "id", - "name", - "line", - "column" - ] - }, - "Scope": { - "type": "object", - "description": "A Scope is a named container for variables. Optionally a scope can map to a source or a range within a source.", - "properties": { - "name": { - "type": "string", - "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated." - }, - "presentationHint": { - "type": "string", - "description": "An optional hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", - "_enum": [ - "arguments", - "locals", - "registers" - ], - "enumDescriptions": [ - "Scope contains method arguments.", - "Scope contains local variables.", - "Scope contains registers. Only a single 'registers' scope should be returned from a 'scopes' request." - ] - }, - "variablesReference": { - "type": "integer", - "description": "The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named variables in this scope.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed variables in this scope.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks." - }, - "expensive": { - "type": "boolean", - "description": "If true, the number of variables in this scope is large or expensive to retrieve." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "Optional source for this scope." - }, - "line": { - "type": "integer", - "description": "Optional start line of the range covered by this scope." - }, - "column": { - "type": "integer", - "description": "Optional start column of the range covered by this scope." - }, - "endLine": { - "type": "integer", - "description": "Optional end line of the range covered by this scope." - }, - "endColumn": { - "type": "integer", - "description": "Optional end column of the range covered by this scope." - } - }, - "required": [ - "name", - "variablesReference", - "expensive" - ] - }, - "Variable": { - "type": "object", - "description": "A Variable is a name/value pair.\nOptionally a variable can have a 'type' that is shown if space permits or when hovering over the variable's name.\nAn optional 'kind' is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the VariablesRequest.\nIf the number of named or indexed children is large, the numbers should be returned via the optional 'namedVariables' and 'indexedVariables' attributes.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks.", - "properties": { - "name": { - "type": "string", - "description": "The variable's name." - }, - "value": { - "type": "string", - "description": "The variable's value. This can be a multi-line text, e.g. for a function the body of a function." - }, - "type": { - "type": "string", - "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." - }, - "presentationHint": { - "$ref": "#/definitions/VariablePresentationHint", - "description": "Properties of a variable that can be used to determine how to render the variable in the UI." - }, - "evaluateName": { - "type": "string", - "description": "Optional evaluatable name of this variable which can be passed to the 'EvaluateRequest' to fetch the variable's value." - }, - "variablesReference": { - "type": "integer", - "description": "If variablesReference is > 0, the variable is structured and its children can be retrieved by passing variablesReference to the VariablesRequest." - }, - "namedVariables": { - "type": "integer", - "description": "The number of named child variables.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks." - }, - "indexedVariables": { - "type": "integer", - "description": "The number of indexed child variables.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks." - }, - "memoryReference": { - "type": "string", - "description": "Optional memory reference for the variable if the variable represents executable code, such as a function pointer.\nThis attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." - } - }, - "required": [ - "name", - "value", - "variablesReference" - ] - }, - "VariablePresentationHint": { - "type": "object", - "description": "Optional properties of a variable that can be used to determine how to render the variable in the UI.", - "properties": { - "kind": { - "description": "The kind of variable. Before introducing additional values, try to use the listed values.", - "type": "string", - "_enum": [ - "property", - "method", - "class", - "data", - "event", - "baseClass", - "innerClass", - "interface", - "mostDerivedClass", - "virtual", - "dataBreakpoint" - ], - "enumDescriptions": [ - "Indicates that the object is a property.", - "Indicates that the object is a method.", - "Indicates that the object is a class.", - "Indicates that the object is data.", - "Indicates that the object is an event.", - "Indicates that the object is a base class.", - "Indicates that the object is an inner class.", - "Indicates that the object is an interface.", - "Indicates that the object is the most derived class.", - "Indicates that the object is virtual, that means it is a synthetic object introducedby the\nadapter for rendering purposes, e.g. an index range for large arrays.", - "Deprecated: Indicates that a data breakpoint is registered for the object. The 'hasDataBreakpoint' attribute should generally be used instead." - ] - }, - "attributes": { - "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", - "type": "array", - "items": { - "type": "string", - "_enum": [ - "static", - "constant", - "readOnly", - "rawString", - "hasObjectId", - "canHaveObjectId", - "hasSideEffects", - "hasDataBreakpoint" - ], - "enumDescriptions": [ - "Indicates that the object is static.", - "Indicates that the object is a constant.", - "Indicates that the object is read only.", - "Indicates that the object is a raw string.", - "Indicates that the object can have an Object ID created for it.", - "Indicates that the object has an Object ID associated with it.", - "Indicates that the evaluation had side effects.", - "Indicates that the object has its value tracked by a data breakpoint." - ] - } - }, - "visibility": { - "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", - "type": "string", - "_enum": [ - "public", - "private", - "protected", - "internal", - "final" - ] - } - } - }, - "BreakpointLocation": { - "type": "object", - "description": "Properties of a breakpoint location returned from the 'breakpointLocations' request.", - "properties": { - "line": { - "type": "integer", - "description": "Start line of breakpoint location." - }, - "column": { - "type": "integer", - "description": "Optional start column of breakpoint location." - }, - "endLine": { - "type": "integer", - "description": "Optional end line of breakpoint location if the location covers a range." - }, - "endColumn": { - "type": "integer", - "description": "Optional end column of breakpoint location if the location covers a range." - } - }, - "required": [ - "line" - ] - }, - "SourceBreakpoint": { - "type": "object", - "description": "Properties of a breakpoint or logpoint passed to the setBreakpoints request.", - "properties": { - "line": { - "type": "integer", - "description": "The source line of the breakpoint or logpoint." - }, - "column": { - "type": "integer", - "description": "An optional source column of the breakpoint." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." - }, - "hitCondition": { - "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." - }, - "logMessage": { - "type": "string", - "description": "If this attribute exists and is non-empty, the backend must not 'break' (stop)\nbut log the message instead. Expressions within {} are interpolated.\nThe attribute is only honored by a debug adapter if the capability 'supportsLogPoints' is true." - } - }, - "required": [ - "line" - ] - }, - "FunctionBreakpoint": { - "type": "object", - "description": "Properties of a breakpoint passed to the setFunctionBreakpoints request.", - "properties": { - "name": { - "type": "string", - "description": "The name of the function." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." - }, - "hitCondition": { - "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." - } - }, - "required": [ - "name" - ] - }, - "DataBreakpointAccessType": { - "type": "string", - "description": "This enumeration defines all possible access types for data breakpoints.", - "enum": [ - "read", - "write", - "readWrite" - ] - }, - "DataBreakpoint": { - "type": "object", - "description": "Properties of a data breakpoint passed to the setDataBreakpoints request.", - "properties": { - "dataId": { - "type": "string", - "description": "An id representing the data. This id is returned from the dataBreakpointInfo request." - }, - "accessType": { - "$ref": "#/definitions/DataBreakpointAccessType", - "description": "The access type of the data." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional breakpoints." - }, - "hitCondition": { - "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed." - } - }, - "required": [ - "dataId" - ] - }, - "InstructionBreakpoint": { - "type": "object", - "description": "Properties of a breakpoint passed to the setInstructionBreakpoints request", - "properties": { - "instructionReference": { - "type": "string", - "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an EvaluateResponse, Variable, StackFrame, GotoTarget, or Breakpoint." - }, - "offset": { - "type": "integer", - "description": "An optional offset from the instruction reference.\nThis can be negative." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." - }, - "hitCondition": { - "type": "string", - "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." - } - }, - "required": [ - "instructionReference" - ] - }, - "Breakpoint": { - "type": "object", - "description": "Information about a Breakpoint created in setBreakpoints, setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints.", - "properties": { - "id": { - "type": "integer", - "description": "An optional identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints." - }, - "verified": { - "type": "boolean", - "description": "If true breakpoint could be set (but not necessarily at the desired location)." - }, - "message": { - "type": "string", - "description": "An optional message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." - }, - "source": { - "$ref": "#/definitions/Source", - "description": "The source where the breakpoint is located." - }, - "line": { - "type": "integer", - "description": "The start line of the actual range covered by the breakpoint." - }, - "column": { - "type": "integer", - "description": "An optional start column of the actual range covered by the breakpoint." - }, - "endLine": { - "type": "integer", - "description": "An optional end line of the actual range covered by the breakpoint." - }, - "endColumn": { - "type": "integer", - "description": "An optional end column of the actual range covered by the breakpoint.\nIf no end line is given, then the end column is assumed to be in the start line." - }, - "instructionReference": { - "type": "string", - "description": "An optional memory reference to where the breakpoint is set." - }, - "offset": { - "type": "integer", - "description": "An optional offset from the instruction reference.\nThis can be negative." - } - }, - "required": [ - "verified" - ] - }, - "SteppingGranularity": { - "type": "string", - "description": "The granularity of one 'step' in the stepping requests 'next', 'stepIn', 'stepOut', and 'stepBack'.", - "enum": [ - "statement", - "line", - "instruction" - ], - "enumDescriptions": [ - "The step should allow the program to run until the current statement has finished executing.\nThe meaning of a statement is determined by the adapter and it may be considered equivalent to a line.\nFor example 'for(int i = 0; i < 10; i++) could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.", - "The step should allow the program to run until the current source line has executed.", - "The step should allow one instruction to execute (e.g. one x86 instruction)." - ] - }, - "StepInTarget": { - "type": "object", - "description": "A StepInTarget can be used in the 'stepIn' request and determines into which single target the stepIn request should step.", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for a stepIn target." - }, - "label": { - "type": "string", - "description": "The name of the stepIn target (shown in the UI)." - } - }, - "required": [ - "id", - "label" - ] - }, - "GotoTarget": { - "type": "object", - "description": "A GotoTarget describes a code location that can be used as a target in the 'goto' request.\nThe possible goto targets can be determined via the 'gotoTargets' request.", - "properties": { - "id": { - "type": "integer", - "description": "Unique identifier for a goto target. This is used in the goto request." - }, - "label": { - "type": "string", - "description": "The name of the goto target (shown in the UI)." - }, - "line": { - "type": "integer", - "description": "The line of the goto target." - }, - "column": { - "type": "integer", - "description": "An optional column of the goto target." - }, - "endLine": { - "type": "integer", - "description": "An optional end line of the range covered by the goto target." - }, - "endColumn": { - "type": "integer", - "description": "An optional end column of the range covered by the goto target." - }, - "instructionPointerReference": { - "type": "string", - "description": "Optional memory reference for the instruction pointer value represented by this target." - } - }, - "required": [ - "id", - "label", - "line" - ] - }, - "CompletionItem": { - "type": "object", - "description": "CompletionItems are the suggestions returned from the CompletionsRequest.", - "properties": { - "label": { - "type": "string", - "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion." - }, - "text": { - "type": "string", - "description": "If text is not falsy then it is inserted instead of the label." - }, - "sortText": { - "type": "string", - "description": "A string that should be used when comparing this item with other items. When `falsy` the label is used." - }, - "type": { - "$ref": "#/definitions/CompletionItemType", - "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon." - }, - "start": { - "type": "integer", - "description": "This value determines the location (in the CompletionsRequest's 'text' attribute) where the completion text is added.\nIf missing the text is added at the location specified by the CompletionsRequest's 'column' attribute." - }, - "length": { - "type": "integer", - "description": "This value determines how many characters are overwritten by the completion text.\nIf missing the value 0 is assumed which results in the completion text being inserted." - }, - "selectionStart": { - "type": "integer", - "description": "Determines the start of the new selection after the text has been inserted (or replaced).\nThe start position must in the range 0 and length of the completion text.\nIf omitted the selection starts at the end of the completion text." - }, - "selectionLength": { - "type": "integer", - "description": "Determines the length of the new selection after the text has been inserted (or replaced).\nThe selection can not extend beyond the bounds of the completion text.\nIf omitted the length is assumed to be 0." - } - }, - "required": [ - "label" - ] - }, - "CompletionItemType": { - "type": "string", - "description": "Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.", - "enum": [ - "method", - "function", - "constructor", - "field", - "variable", - "class", - "interface", - "module", - "property", - "unit", - "value", - "enum", - "keyword", - "snippet", - "text", - "color", - "file", - "reference", - "customcolor" - ] - }, - "ChecksumAlgorithm": { - "type": "string", - "description": "Names of checksum algorithms that may be supported by a debug adapter.", - "enum": [ - "MD5", - "SHA1", - "SHA256", - "timestamp" - ] - }, - "Checksum": { - "type": "object", - "description": "The checksum of an item calculated by the specified algorithm.", - "properties": { - "algorithm": { - "$ref": "#/definitions/ChecksumAlgorithm", - "description": "The algorithm used to calculate this checksum." - }, - "checksum": { - "type": "string", - "description": "Value of the checksum." - } - }, - "required": [ - "algorithm", - "checksum" - ] - }, - "ValueFormat": { - "type": "object", - "description": "Provides formatting information for a value.", - "properties": { - "hex": { - "type": "boolean", - "description": "Display the value in hex." - } - } - }, - "StackFrameFormat": { - "allOf": [ - { - "$ref": "#/definitions/ValueFormat" - }, - { - "type": "object", - "description": "Provides formatting information for a stack frame.", - "properties": { - "parameters": { - "type": "boolean", - "description": "Displays parameters for the stack frame." - }, - "parameterTypes": { - "type": "boolean", - "description": "Displays the types of parameters for the stack frame." - }, - "parameterNames": { - "type": "boolean", - "description": "Displays the names of parameters for the stack frame." - }, - "parameterValues": { - "type": "boolean", - "description": "Displays the values of parameters for the stack frame." - }, - "line": { - "type": "boolean", - "description": "Displays the line number of the stack frame." - }, - "module": { - "type": "boolean", - "description": "Displays the module of the stack frame." - }, - "includeAll": { - "type": "boolean", - "description": "Includes all stack frames, including those the debug adapter might otherwise hide." - } - } - } - ] - }, - "ExceptionFilterOptions": { - "type": "object", - "description": "An ExceptionFilterOptions is used to specify an exception filter together with a condition for the setExceptionsFilter request.", - "properties": { - "filterId": { - "type": "string", - "description": "ID of an exception filter returned by the 'exceptionBreakpointFilters' capability." - }, - "condition": { - "type": "string", - "description": "An optional expression for conditional exceptions.\nThe exception will break into the debugger if the result of the condition is true." - } - }, - "required": [ - "filterId" - ] - }, - "ExceptionOptions": { - "type": "object", - "description": "An ExceptionOptions assigns configuration options to a set of exceptions.", - "properties": { - "path": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionPathSegment" - }, - "description": "A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." - }, - "breakMode": { - "$ref": "#/definitions/ExceptionBreakMode", - "description": "Condition when a thrown exception should result in a break." - } - }, - "required": [ - "breakMode" - ] - }, - "ExceptionBreakMode": { - "type": "string", - "description": "This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.", - "enum": [ - "never", - "always", - "unhandled", - "userUnhandled" - ] - }, - "ExceptionPathSegment": { - "type": "object", - "description": "An ExceptionPathSegment represents a segment in a path that is used to match leaves or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if 'negate' is false or missing or\nit matches anything except the names provided if 'negate' is true.", - "properties": { - "negate": { - "type": "boolean", - "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided." - }, - "names": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Depending on the value of 'negate' the names that should match or not match." - } - }, - "required": [ - "names" - ] - }, - "ExceptionDetails": { - "type": "object", - "description": "Detailed information about an exception that has occurred.", - "properties": { - "message": { - "type": "string", - "description": "Message contained in the exception." - }, - "typeName": { - "type": "string", - "description": "Short type name of the exception object." - }, - "fullTypeName": { - "type": "string", - "description": "Fully-qualified type name of the exception object." - }, - "evaluateName": { - "type": "string", - "description": "Optional expression that can be evaluated in the current scope to obtain the exception object." - }, - "stackTrace": { - "type": "string", - "description": "Stack trace at the time the exception was thrown." - }, - "innerException": { - "type": "array", - "items": { - "$ref": "#/definitions/ExceptionDetails" - }, - "description": "Details of the exception contained by this exception, if any." - } - } - }, - "DisassembledInstruction": { - "type": "object", - "description": "Represents a single disassembled instruction.", - "properties": { - "address": { - "type": "string", - "description": "The address of the instruction. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise." - }, - "instructionBytes": { - "type": "string", - "description": "Optional raw bytes representing the instruction and its operands, in an implementation-defined format." - }, - "instruction": { - "type": "string", - "description": "Text representing the instruction and its operands, in an implementation-defined format." - }, - "symbol": { - "type": "string", - "description": "Name of the symbol that corresponds with the location of this instruction, if any." - }, - "location": { - "$ref": "#/definitions/Source", - "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction." - }, - "line": { - "type": "integer", - "description": "The line within the source location that corresponds to this instruction, if any." - }, - "column": { - "type": "integer", - "description": "The column within the line that corresponds to this instruction, if any." - }, - "endLine": { - "type": "integer", - "description": "The end line of the range that corresponds to this instruction, if any." - }, - "endColumn": { - "type": "integer", - "description": "The end column of the range that corresponds to this instruction, if any." - } - }, - "required": [ - "address", - "instruction" - ] - }, - "InvalidatedAreas": { - "type": "string", - "description": "Logical areas that can be invalidated by the 'invalidated' event.", - "_enum": [ - "all", - "stacks", - "threads", - "variables" - ], - "enumDescriptions": [ - "All previously fetched data has become invalid and needs to be refetched.", - "Previously fetched stack related data has become invalid and needs to be refetched.", - "Previously fetched thread related data has become invalid and needs to be refetched.", - "Previously fetched variable data has become invalid and needs to be refetched." - ] - } - } + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Debug Adapter Protocol", + "description": "The Debug Adapter Protocol defines the protocol used between an editor or IDE and a debugger or runtime.", + "type": "object", + + + "definitions": { + + "ProtocolMessage": { + "type": "object", + "title": "Base Protocol", + "description": "Base class of requests, responses, and events.", + "properties": { + "seq": { + "type": "integer", + "description": "Sequence number (also known as message ID). For protocol messages of type 'request' this ID can be used to cancel the request." + }, + "type": { + "type": "string", + "description": "Message type.", + "_enum": [ "request", "response", "event" ] + } + }, + "required": [ "seq", "type" ] + }, + + "Request": { + "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { + "type": "object", + "description": "A client or debug adapter initiated request.", + "properties": { + "type": { + "type": "string", + "enum": [ "request" ] + }, + "command": { + "type": "string", + "description": "The command to execute." + }, + "arguments": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Object containing arguments for the command." + } + }, + "required": [ "type", "command" ] + }] + }, + + "Event": { + "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { + "type": "object", + "description": "A debug adapter initiated event.", + "properties": { + "type": { + "type": "string", + "enum": [ "event" ] + }, + "event": { + "type": "string", + "description": "Type of event." + }, + "body": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Event-specific information." + } + }, + "required": [ "type", "event" ] + }] + }, + + "Response": { + "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { + "type": "object", + "description": "Response for a request.", + "properties": { + "type": { + "type": "string", + "enum": [ "response" ] + }, + "request_seq": { + "type": "integer", + "description": "Sequence number of the corresponding request." + }, + "success": { + "type": "boolean", + "description": "Outcome of the request.\nIf true, the request was successful and the 'body' attribute may contain the result of the request.\nIf the value is false, the attribute 'message' contains the error in short form and the 'body' may contain additional information (see 'ErrorResponse.body.error')." + }, + "command": { + "type": "string", + "description": "The command requested." + }, + "message": { + "type": "string", + "description": "Contains the raw error in short form if 'success' is false.\nThis raw error might be interpreted by the frontend and is not shown in the UI.\nSome predefined values exist.", + "_enum": [ "cancelled" ], + "enumDescriptions": [ + "request was cancelled." + ] + }, + "body": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Contains request result if success is true and optional error details if success is false." + } + }, + "required": [ "type", "request_seq", "success", "command" ] + }] + }, + + "ErrorResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "On error (whenever 'success' is false), the body can provide more details.", + "properties": { + "body": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Message", + "description": "An optional, structured error message." + } + } + } + }, + "required": [ "body" ] + }] + }, + + "CancelRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The 'cancel' request is used by the frontend in two situations:\n- to indicate that it is no longer interested in the result produced by a specific request issued earlier\n- to cancel a progress sequence. Clients should only call this request if the capability 'supportsCancelRequest' is true.\nThis request has a hint characteristic: a debug adapter can only be expected to make a 'best effort' in honouring this request but there are no guarantees.\nThe 'cancel' request may return an error if it could not cancel an operation but a frontend should refrain from presenting this error to end users.\nA frontend client should only call this request if the capability 'supportsCancelRequest' is true.\nThe request that got canceled still needs to send a response back. This can either be a normal result ('success' attribute true)\nor an error response ('success' attribute false and the 'message' set to 'cancelled').\nReturning partial results from a cancelled request is possible but please note that a frontend client has no generic way for detecting that a response is partial or not.\n The progress that got cancelled still needs to send a 'progressEnd' event back.\n A client should not assume that progress just got cancelled after sending the 'cancel' request.", + "properties": { + "command": { + "type": "string", + "enum": [ "cancel" ] + }, + "arguments": { + "$ref": "#/definitions/CancelArguments" + } + }, + "required": [ "command" ] + }] + }, + "CancelArguments": { + "type": "object", + "description": "Arguments for 'cancel' request.", + "properties": { + "requestId": { + "type": "integer", + "description": "The ID (attribute 'seq') of the request to cancel. If missing no request is cancelled.\nBoth a 'requestId' and a 'progressId' can be specified in one request." + }, + "progressId": { + "type": "string", + "description": "The ID (attribute 'progressId') of the progress to cancel. If missing no progress is cancelled.\nBoth a 'requestId' and a 'progressId' can be specified in one request." + } + } + }, + "CancelResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'cancel' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "InitializedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "title": "Events", + "description": "This event indicates that the debug adapter is ready to accept configuration requests (e.g. SetBreakpointsRequest, SetExceptionBreakpointsRequest).\nA debug adapter is expected to send this event when it is ready to accept configuration requests (but not before the 'initialize' request has finished).\nThe sequence of events/requests is as follows:\n- adapters sends 'initialized' event (after the 'initialize' request has returned)\n- frontend sends zero or more 'setBreakpoints' requests\n- frontend sends one 'setFunctionBreakpoints' request (if capability 'supportsFunctionBreakpoints' is true)\n- frontend sends a 'setExceptionBreakpoints' request if one or more 'exceptionBreakpointFilters' have been defined (or if 'supportsConfigurationDoneRequest' is not defined or false)\n- frontend sends other future configuration requests\n- frontend sends one 'configurationDone' request to indicate the end of the configuration.", + "properties": { + "event": { + "type": "string", + "enum": [ "initialized" ] + } + }, + "required": [ "event" ] + }] + }, + + "StoppedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the execution of the debuggee has stopped due to some condition.\nThis can be caused by a break point previously set, a stepping request has completed, by executing a debugger statement etc.", + "properties": { + "event": { + "type": "string", + "enum": [ "stopped" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.\nFor backward compatibility this string is shown in the UI if the 'description' attribute is missing (but it must not be translated).", + "_enum": [ "step", "breakpoint", "exception", "pause", "entry", "goto", "function breakpoint", "data breakpoint", "instruction breakpoint" ] + }, + "description": { + "type": "string", + "description": "The full reason for the event, e.g. 'Paused on exception'. This string is shown in the UI as is and must be translated." + }, + "threadId": { + "type": "integer", + "description": "The thread which was stopped." + }, + "preserveFocusHint": { + "type": "boolean", + "description": "A value of true hints to the frontend that this event should not change the focus." + }, + "text": { + "type": "string", + "description": "Additional information. E.g. if reason is 'exception', text contains the exception name. This string is shown in the UI." + }, + "allThreadsStopped": { + "type": "boolean", + "description": "If 'allThreadsStopped' is true, a debug adapter can announce that all threads have stopped.\n- The client should use this information to enable that all threads can be expanded to access their stacktraces.\n- If the attribute is missing or false, only the thread with the given threadId can be expanded." + }, + "hitBreakpointIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Ids of the breakpoints that triggered the event. In most cases there will be only a single breakpoint but here are some examples for multiple breakpoints:\n- Different types of breakpoints map to the same location.\n- Multiple source breakpoints get collapsed to the same instruction by the compiler/runtime.\n- Multiple function breakpoints with different function names map to the same location." + } + }, + "required": [ "reason" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ContinuedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the execution of the debuggee has continued.\nPlease note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. 'launch' or 'continue'.\nIt is only necessary to send a 'continued' event if there was no previous request that implied this.", + "properties": { + "event": { + "type": "string", + "enum": [ "continued" ] + }, + "body": { + "type": "object", + "properties": { + "threadId": { + "type": "integer", + "description": "The thread which was continued." + }, + "allThreadsContinued": { + "type": "boolean", + "description": "If 'allThreadsContinued' is true, a debug adapter can announce that all threads have continued." + } + }, + "required": [ "threadId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ExitedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the debuggee has exited and returns its exit code.", + "properties": { + "event": { + "type": "string", + "enum": [ "exited" ] + }, + "body": { + "type": "object", + "properties": { + "exitCode": { + "type": "integer", + "description": "The exit code returned from the debuggee." + } + }, + "required": [ "exitCode" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "TerminatedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that debugging of the debuggee has terminated. This does **not** mean that the debuggee itself has exited.", + "properties": { + "event": { + "type": "string", + "enum": [ "terminated" ] + }, + "body": { + "type": "object", + "properties": { + "restart": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session.\nThe value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests." + } + } + } + }, + "required": [ "event" ] + }] + }, + + "ThreadEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that a thread has started or exited.", + "properties": { + "event": { + "type": "string", + "enum": [ "thread" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ "started", "exited" ] + }, + "threadId": { + "type": "integer", + "description": "The identifier of the thread." + } + }, + "required": ["reason", "threadId"] + } + }, + "required": [ "event", "body" ] + }] + }, + + "OutputEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that the target has produced some output.", + "properties": { + "event": { + "type": "string", + "enum": [ "output" ] + }, + "body": { + "type": "object", + "properties": { + "category": { + "type": "string", + "description": "The output category. If not specified, 'console' is assumed.", + "_enum": [ "console", "stdout", "stderr", "telemetry" ] + }, + "output": { + "type": "string", + "description": "The output to report." + }, + "group": { + "type": "string", + "description": "Support for keeping an output log organized by grouping related messages.", + "enum": [ "start", "startCollapsed", "end" ], + "enumDescriptions": [ + "Start a new group in expanded mode. Subsequent output events are members of the group and should be shown indented.\nThe 'output' attribute becomes the name of the group and is not indented.", + "Start a new group in collapsed mode. Subsequent output events are members of the group and should be shown indented (as soon as the group is expanded).\nThe 'output' attribute becomes the name of the group and is not indented.", + "End the current group and decreases the indentation of subsequent output events.\nA non empty 'output' attribute is shown as the unindented end of the group." + ] + }, + "variablesReference": { + "type": "integer", + "description": "If an attribute 'variablesReference' exists and its value is > 0, the output contains objects which can be retrieved by passing 'variablesReference' to the 'variables' request. The value should be less than or equal to 2147483647 (2^31-1)." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "An optional source location where the output was produced." + }, + "line": { + "type": "integer", + "description": "An optional source location line where the output was produced." + }, + "column": { + "type": "integer", + "description": "An optional source location column where the output was produced." + }, + "data": { + "type": [ "array", "boolean", "integer", "null", "number" , "object", "string" ], + "description": "Optional data to report. For the 'telemetry' category the data will be sent to telemetry, for the other categories the data is shown in JSON format." + } + }, + "required": ["output"] + } + }, + "required": [ "event", "body" ] + }] + }, + + "BreakpointEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that some information about a breakpoint has changed.", + "properties": { + "event": { + "type": "string", + "enum": [ "breakpoint" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "_enum": [ "changed", "new", "removed" ] + }, + "breakpoint": { + "$ref": "#/definitions/Breakpoint", + "description": "The 'id' attribute is used to find the target breakpoint and the other attributes are used as the new values." + } + }, + "required": [ "reason", "breakpoint" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ModuleEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that some information about a module has changed.", + "properties": { + "event": { + "type": "string", + "enum": [ "module" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ "new", "changed", "removed" ] + }, + "module": { + "$ref": "#/definitions/Module", + "description": "The new, changed, or removed module. In case of 'removed' only the module id is used." + } + }, + "required": [ "reason", "module" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "LoadedSourceEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that some source has been added, changed, or removed from the set of all loaded sources.", + "properties": { + "event": { + "type": "string", + "enum": [ "loadedSource" ] + }, + "body": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason for the event.", + "enum": [ "new", "changed", "removed" ] + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The new, changed, or removed source." + } + }, + "required": [ "reason", "source" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProcessEvent": { + "allOf": [ + { "$ref": "#/definitions/Event" }, + { + "type": "object", + "description": "The event indicates that the debugger has begun debugging a new process. Either one that it has launched, or one that it has attached to.", + "properties": { + "event": { + "type": "string", + "enum": [ "process" ] + }, + "body": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The logical name of the process. This is usually the full path to process's executable file. Example: /home/example/myproj/program.js." + }, + "systemProcessId": { + "type": "integer", + "description": "The system process id of the debugged process. This property will be missing for non-system processes." + }, + "isLocalProcess": { + "type": "boolean", + "description": "If true, the process is running on the same computer as the debug adapter." + }, + "startMethod": { + "type": "string", + "enum": [ "launch", "attach", "attachForSuspendedLaunch" ], + "description": "Describes how the debug engine started debugging this process.", + "enumDescriptions": [ + "Process was launched under the debugger.", + "Debugger attached to an existing process.", + "A project launcher component has launched a new process in a suspended state and then asked the debugger to attach." + ] + }, + "pointerSize": { + "type": "integer", + "description": "The size of a pointer or address for this process, in bits. This value may be used by clients when formatting addresses for display." + } + }, + "required": [ "name" ] + } + }, + "required": [ "event", "body" ] + } + ] + }, + + "CapabilitiesEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event indicates that one or more capabilities have changed.\nSince the capabilities are dependent on the frontend and its UI, it might not be possible to change that at random times (or too late).\nConsequently this event has a hint characteristic: a frontend can only be expected to make a 'best effort' in honouring individual capabilities but there are no guarantees.\nOnly changed capabilities need to be included, all other capabilities keep their values.", + "properties": { + "event": { + "type": "string", + "enum": [ "capabilities" ] + }, + "body": { + "type": "object", + "properties": { + "capabilities": { + "$ref": "#/definitions/Capabilities", + "description": "The set of updated capabilities." + } + }, + "required": [ "capabilities" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressStartEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals that a long running operation is about to start and\nprovides additional information for the client to set up a corresponding progress and cancellation UI.\nThe client is free to delay the showing of the UI in order to reduce flicker.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressStart" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "An ID that must be used in subsequent 'progressUpdate' and 'progressEnd' events to make them refer to the same progress reporting.\nIDs must be unique within a debug session." + }, + "title": { + "type": "string", + "description": "Mandatory (short) title of the progress reporting. Shown in the UI to describe the long running operation." + }, + "requestId": { + "type": "integer", + "description": "The request ID that this progress report is related to. If specified a debug adapter is expected to emit\nprogress events for the long running request until the request has been either completed or cancelled.\nIf the request ID is omitted, the progress report is assumed to be related to some general activity of the debug adapter." + }, + "cancellable": { + "type": "boolean", + "description": "If true, the request that reports progress may be canceled with a 'cancel' request.\nSo this property basically controls whether the client should use UX that supports cancellation.\nClients that don't support cancellation are allowed to ignore the setting." + }, + "message": { + "type": "string", + "description": "Optional, more detailed progress message." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + }, + "required": [ "progressId", "title" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressUpdateEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals that the progress reporting needs to updated with a new message and/or percentage.\nThe client does not have to update the UI immediately, but the clients needs to keep track of the message and/or percentage values.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressUpdate" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial 'progressStart' event." + }, + "message": { + "type": "string", + "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." + }, + "percentage": { + "type": "number", + "description": "Optional progress percentage to display (value range: 0 to 100). If omitted no percentage will be shown." + } + }, + "required": [ "progressId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "ProgressEndEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "The event signals the end of the progress reporting with an optional final message.\nThis event should only be sent if the client has passed the value true for the 'supportsProgressReporting' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ "progressEnd" ] + }, + "body": { + "type": "object", + "properties": { + "progressId": { + "type": "string", + "description": "The ID that was introduced in the initial 'ProgressStartEvent'." + }, + "message": { + "type": "string", + "description": "Optional, more detailed progress message. If omitted, the previous message (if any) is used." + } + }, + "required": [ "progressId" ] + } + }, + "required": [ "event", "body" ] + }] + }, + + "InvalidatedEvent": { + "allOf": [ { "$ref": "#/definitions/Event" }, { + "type": "object", + "description": "This event signals that some state in the debug adapter has changed and requires that the client needs to re-render the data snapshot previously requested.\nDebug adapters do not have to emit this event for runtime changes like stopped or thread events because in that case the client refetches the new state anyway. But the event can be used for example to refresh the UI after rendering formatting has changed in the debug adapter.\nThis event should only be sent if the debug adapter has received a value true for the 'supportsInvalidatedEvent' capability of the 'initialize' request.", + "properties": { + "event": { + "type": "string", + "enum": [ "invalidated" ] + }, + "body": { + "type": "object", + "properties": { + "areas": { + "type": "array", + "description": "Optional set of logical areas that got invalidated. This property has a hint characteristic: a client can only be expected to make a 'best effort' in honouring the areas but there are no guarantees. If this property is missing, empty, or if values are not understand the client should assume a single value 'all'.", + "items": { + "$ref": "#/definitions/InvalidatedAreas" + } + }, + "threadId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this thread." + }, + "stackFrameId": { + "type": "integer", + "description": "If specified, the client only needs to refetch data related to this stack frame (and the 'threadId' is ignored)." + } + } + } + }, + "required": [ "event", "body" ] + }] + }, + + "RunInTerminalRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "title": "Reverse Requests", + "description": "This optional request is sent from the debug adapter to the client to run a command in a terminal.\nThis is typically used to launch the debuggee in a terminal provided by the client.\nThis request should only be called if the client has passed the value true for the 'supportsRunInTerminalRequest' capability of the 'initialize' request.", + "properties": { + "command": { + "type": "string", + "enum": [ "runInTerminal" ] + }, + "arguments": { + "$ref": "#/definitions/RunInTerminalRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "RunInTerminalRequestArguments": { + "type": "object", + "description": "Arguments for 'runInTerminal' request.", + "properties": { + "kind": { + "type": "string", + "enum": [ "integrated", "external" ], + "description": "What kind of terminal to launch." + }, + "title": { + "type": "string", + "description": "Optional title of the terminal." + }, + "cwd": { + "type": "string", + "description": "Working directory for the command. For non-empty, valid paths this typically results in execution of a change directory command." + }, + "args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of arguments. The first argument is the command to run." + }, + "env": { + "type": "object", + "description": "Environment key-value pairs that are added to or removed from the default environment.", + "additionalProperties": { + "type": [ "string", "null" ], + "description": "Proper values must be strings. A value of 'null' removes the variable from the environment." + } + } + }, + "required": [ "args", "cwd" ] + }, + "RunInTerminalResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'runInTerminal' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "processId": { + "type": "integer", + "description": "The process ID. The value should be less than or equal to 2147483647 (2^31-1)." + }, + "shellProcessId": { + "type": "integer", + "description": "The process ID of the terminal shell. The value should be less than or equal to 2147483647 (2^31-1)." + } + } + } + }, + "required": [ "body" ] + }] + }, + + "InitializeRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "title": "Requests", + "description": "The 'initialize' request is sent as the first request from the client to the debug adapter\nin order to configure it with client capabilities and to retrieve capabilities from the debug adapter.\nUntil the debug adapter has responded to with an 'initialize' response, the client must not send any additional requests or events to the debug adapter.\nIn addition the debug adapter is not allowed to send any requests or events to the client until it has responded with an 'initialize' response.\nThe 'initialize' request may only be sent once.", + "properties": { + "command": { + "type": "string", + "enum": [ "initialize" ] + }, + "arguments": { + "$ref": "#/definitions/InitializeRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "InitializeRequestArguments": { + "type": "object", + "description": "Arguments for 'initialize' request.", + "properties": { + "clientID": { + "type": "string", + "description": "The ID of the (frontend) client using this adapter." + }, + "clientName": { + "type": "string", + "description": "The human readable name of the (frontend) client using this adapter." + }, + "adapterID": { + "type": "string", + "description": "The ID of the debug adapter." + }, + "locale": { + "type": "string", + "description": "The ISO-639 locale of the (frontend) client using this adapter, e.g. en-US or de-CH." + }, + "linesStartAt1": { + "type": "boolean", + "description": "If true all line numbers are 1-based (default)." + }, + "columnsStartAt1": { + "type": "boolean", + "description": "If true all column numbers are 1-based (default)." + }, + "pathFormat": { + "type": "string", + "_enum": [ "path", "uri" ], + "description": "Determines in what format paths are specified. The default is 'path', which is the native format." + }, + "supportsVariableType": { + "type": "boolean", + "description": "Client supports the optional type attribute for variables." + }, + "supportsVariablePaging": { + "type": "boolean", + "description": "Client supports the paging of variables." + }, + "supportsRunInTerminalRequest": { + "type": "boolean", + "description": "Client supports the runInTerminal request." + }, + "supportsMemoryReferences": { + "type": "boolean", + "description": "Client supports memory references." + }, + "supportsProgressReporting": { + "type": "boolean", + "description": "Client supports progress reporting." + }, + "supportsInvalidatedEvent": { + "type": "boolean", + "description": "Client supports the invalidated event." + } + }, + "required": [ "adapterID" ] + }, + "InitializeResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'initialize' request.", + "properties": { + "body": { + "$ref": "#/definitions/Capabilities", + "description": "The capabilities of this debug adapter." + } + } + }] + }, + + "ConfigurationDoneRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This optional request indicates that the client has finished initialization of the debug adapter.\nSo it is the last request in the sequence of configuration requests (which was started by the 'initialized' event).\nClients should only call this request if the capability 'supportsConfigurationDoneRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "configurationDone" ] + }, + "arguments": { + "$ref": "#/definitions/ConfigurationDoneArguments" + } + }, + "required": [ "command" ] + }] + }, + "ConfigurationDoneArguments": { + "type": "object", + "description": "Arguments for 'configurationDone' request." + }, + "ConfigurationDoneResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'configurationDone' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "LaunchRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This launch request is sent from the client to the debug adapter to start the debuggee with or without debugging (if 'noDebug' is true).\nSince launching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { + "type": "string", + "enum": [ "launch" ] + }, + "arguments": { + "$ref": "#/definitions/LaunchRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "LaunchRequestArguments": { + "type": "object", + "description": "Arguments for 'launch' request. Additional attributes are implementation specific.", + "properties": { + "noDebug": { + "type": "boolean", + "description": "If noDebug is true the launch request should launch the program without enabling debugging." + }, + "__restart": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact." + } + } + }, + "LaunchResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'launch' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "AttachRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The attach request is sent from the client to the debug adapter to attach to a debuggee that is already running.\nSince attaching is debugger/runtime specific, the arguments for this request are not part of this specification.", + "properties": { + "command": { + "type": "string", + "enum": [ "attach" ] + }, + "arguments": { + "$ref": "#/definitions/AttachRequestArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "AttachRequestArguments": { + "type": "object", + "description": "Arguments for 'attach' request. Additional attributes are implementation specific.", + "properties": { + "__restart": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "Optional data from the previous, restarted session.\nThe data is sent as the 'restart' attribute of the 'terminated' event.\nThe client should leave the data intact." + } + } + }, + "AttachResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'attach' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "RestartRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Restarts a debug session. Clients should only call this request if the capability 'supportsRestartRequest' is true.\nIf the capability is missing or has the value false, a typical client will emulate 'restart' by terminating the debug adapter first and then launching it anew.", + "properties": { + "command": { + "type": "string", + "enum": [ "restart" ] + }, + "arguments": { + "$ref": "#/definitions/RestartArguments" + } + }, + "required": [ "command" ] + }] + }, + "RestartArguments": { + "type": "object", + "description": "Arguments for 'restart' request.", + "properties": { + "arguments": { + "oneOf": [ + { "$ref": "#/definitions/LaunchRequestArguments" }, + { "$ref": "#/definitions/AttachRequestArguments" } + ], + "description": "The latest version of the 'launch' or 'attach' configuration." + } + } + }, + "RestartResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'restart' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "DisconnectRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The 'disconnect' request is sent from the client to the debug adapter in order to stop debugging.\nIt asks the debug adapter to disconnect from the debuggee and to terminate the debug adapter.\nIf the debuggee has been started with the 'launch' request, the 'disconnect' request terminates the debuggee.\nIf the 'attach' request was used to connect to the debuggee, 'disconnect' does not terminate the debuggee.\nThis behavior can be controlled with the 'terminateDebuggee' argument (if supported by the debug adapter).", + "properties": { + "command": { + "type": "string", + "enum": [ "disconnect" ] + }, + "arguments": { + "$ref": "#/definitions/DisconnectArguments" + } + }, + "required": [ "command" ] + }] + }, + "DisconnectArguments": { + "type": "object", + "description": "Arguments for 'disconnect' request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this 'disconnect' request is part of a restart sequence." + }, + "terminateDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should be terminated when the debugger is disconnected.\nIf unspecified, the debug adapter is free to do whatever it thinks is best.\nThe attribute is only honored by a debug adapter if the capability 'supportTerminateDebuggee' is true." + }, + "suspendDebuggee": { + "type": "boolean", + "description": "Indicates whether the debuggee should stay suspended when the debugger is disconnected.\nIf unspecified, the debuggee should resume execution.\nThe attribute is only honored by a debug adapter if the capability 'supportSuspendDebuggee' is true." + } + } + }, + "DisconnectResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'disconnect' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "TerminateRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The 'terminate' request is sent from the client to the debug adapter in order to give the debuggee a chance for terminating itself.\nClients should only call this request if the capability 'supportsTerminateRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "terminate" ] + }, + "arguments": { + "$ref": "#/definitions/TerminateArguments" + } + }, + "required": [ "command" ] + }] + }, + "TerminateArguments": { + "type": "object", + "description": "Arguments for 'terminate' request.", + "properties": { + "restart": { + "type": "boolean", + "description": "A value of true indicates that this 'terminate' request is part of a restart sequence." + } + } + }, + "TerminateResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'terminate' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "BreakpointLocationsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The 'breakpointLocations' request returns all possible locations for source breakpoints in a given range.\nClients should only call this request if the capability 'supportsBreakpointLocationsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "breakpointLocations" ] + }, + "arguments": { + "$ref": "#/definitions/BreakpointLocationsArguments" + } + }, + "required": [ "command" ] + }] + + }, + "BreakpointLocationsArguments": { + "type": "object", + "description": "Arguments for 'breakpointLocations' request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified." + }, + "line": { + "type": "integer", + "description": "Start line of range to search possible breakpoint locations in. If only the line is specified, the request returns all possible locations in that line." + }, + "column": { + "type": "integer", + "description": "Optional start column of range to search possible breakpoint locations in. If no start column is given, the first column in the start line is assumed." + }, + "endLine": { + "type": "integer", + "description": "Optional end line of range to search possible breakpoint locations in. If no end line is given, then the end line is assumed to be the start line." + }, + "endColumn": { + "type": "integer", + "description": "Optional end column of range to search possible breakpoint locations in. If no end column is given, then it is assumed to be in the last column of the end line." + } + }, + "required": [ "source", "line" ] + }, + "BreakpointLocationsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'breakpointLocations' request.\nContains possible locations for source breakpoints.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/BreakpointLocation" + }, + "description": "Sorted set of possible breakpoint locations." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Sets multiple breakpoints for a single source and clears all previous breakpoints in that source.\nTo clear all breakpoint for a source, specify an empty array.\nWhen a breakpoint is hit, a 'stopped' event (with reason 'breakpoint') is generated.", + "properties": { + "command": { + "type": "string", + "enum": [ "setBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setBreakpoints' request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location of the breakpoints; either 'source.path' or 'source.reference' must be specified." + }, + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/SourceBreakpoint" + }, + "description": "The code locations of the breakpoints." + }, + "lines": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Deprecated: The code locations of the breakpoints." + }, + "sourceModified": { + "type": "boolean", + "description": "A value of true indicates that the underlying source has been modified which results in new breakpoint locations." + } + }, + "required": [ "source" ] + }, + "SetBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'setBreakpoints' request.\nReturned is information about each breakpoint created by this request.\nThis includes the actual code location and whether the breakpoint could be verified.\nThe breakpoints returned are in the same order as the elements of the 'breakpoints'\n(or the deprecated 'lines') array in the arguments.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints.\nThe array elements are in the same order as the elements of the 'breakpoints' (or the deprecated 'lines') array in the arguments." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetFunctionBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Replaces all existing function breakpoints with new function breakpoints.\nTo clear all function breakpoints, specify an empty array.\nWhen a function breakpoint is hit, a 'stopped' event (with reason 'function breakpoint') is generated.\nClients should only call this request if the capability 'supportsFunctionBreakpoints' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setFunctionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetFunctionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetFunctionBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setFunctionBreakpoints' request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/FunctionBreakpoint" + }, + "description": "The function names of the breakpoints." + } + }, + "required": [ "breakpoints" ] + }, + "SetFunctionBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'setFunctionBreakpoints' request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetExceptionBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request configures the debuggers response to thrown exceptions.\nIf an exception is configured to break, a 'stopped' event is fired (with reason 'exception').\nClients should only call this request if the capability 'exceptionBreakpointFilters' returns one or more filters.", + "properties": { + "command": { + "type": "string", + "enum": [ "setExceptionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetExceptionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetExceptionBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setExceptionBreakpoints' request.", + "properties": { + "filters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Set of exception filters specified by their ID. The set of all possible exception filters is defined by the 'exceptionBreakpointFilters' capability. The 'filter' and 'filterOptions' sets are additive." + }, + "filterOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionFilterOptions" + }, + "description": "Set of exception filters and their options. The set of all possible exception filters is defined by the 'exceptionBreakpointFilters' capability. This attribute is only honored by a debug adapter if the capability 'supportsExceptionFilterOptions' is true. The 'filter' and 'filterOptions' sets are additive." + }, + "exceptionOptions": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionOptions" + }, + "description": "Configuration options for selected exceptions.\nThe attribute is only honored by a debug adapter if the capability 'supportsExceptionOptions' is true." + } + }, + "required": [ "filters" ] + }, + "SetExceptionBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'setExceptionBreakpoints' request.\nThe response contains an array of Breakpoint objects with information about each exception breakpoint or filter. The Breakpoint objects are in the same order as the elements of the 'filters', 'filterOptions', 'exceptionOptions' arrays given as arguments. If both 'filters' and 'filterOptions' are given, the returned array must start with 'filters' information first, followed by 'filterOptions' information.\nThe mandatory 'verified' property of a Breakpoint object signals whether the exception breakpoint or filter could be successfully created and whether the optional condition or hit count expressions are valid. In case of an error the 'message' property explains the problem. An optional 'id' property can be used to introduce a unique ID for the exception breakpoint or filter so that it can be updated subsequently by sending breakpoint events.\nFor backward compatibility both the 'breakpoints' array and the enclosing 'body' are optional. If these elements are missing a client will not be able to show problems for individual exception breakpoints or filters.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the exception breakpoints or filters.\nThe breakpoints returned are in the same order as the elements of the 'filters', 'filterOptions', 'exceptionOptions' arrays in the arguments. If both 'filters' and 'filterOptions' are given, the returned array must start with 'filters' information first, followed by 'filterOptions' information." + } + } + } + } + }] + }, + + "DataBreakpointInfoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Obtains information on a possible data breakpoint that could be set on an expression or variable.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "dataBreakpointInfo" ] + }, + "arguments": { + "$ref": "#/definitions/DataBreakpointInfoArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "DataBreakpointInfoArguments": { + "type": "object", + "description": "Arguments for 'dataBreakpointInfo' request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "Reference to the Variable container if the data breakpoint is requested for a child of the container." + }, + "name": { + "type": "string", + "description": "The name of the Variable's child to obtain data breakpoint information for.\nIf variablesReference isn’t provided, this can be an expression." + } + }, + "required": [ "name" ] + }, + "DataBreakpointInfoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'dataBreakpointInfo' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "dataId": { + "type": [ "string", "null" ], + "description": "An identifier for the data on which a data breakpoint can be registered with the setDataBreakpoints request or null if no data breakpoint is available." + }, + "description": { + "type": "string", + "description": "UI string that describes on what data the breakpoint is set on or why a data breakpoint is not available." + }, + "accessTypes": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpointAccessType" + }, + "description": "Optional attribute listing the available access types for a potential data breakpoint. A UI frontend could surface this information." + }, + "canPersist": { + "type": "boolean", + "description": "Optional attribute indicating that a potential data breakpoint could be persisted across sessions." + } + }, + "required": [ "dataId", "description" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetDataBreakpointsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Replaces all existing data breakpoints with new data breakpoints.\nTo clear all data breakpoints, specify an empty array.\nWhen a data breakpoint is hit, a 'stopped' event (with reason 'data breakpoint') is generated.\nClients should only call this request if the capability 'supportsDataBreakpoints' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setDataBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetDataBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetDataBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setDataBreakpoints' request.", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/DataBreakpoint" + }, + "description": "The contents of this array replaces all existing data breakpoints. An empty array clears all data breakpoints." + } + }, + "required": [ "breakpoints" ] + }, + "SetDataBreakpointsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'setDataBreakpoints' request.\nReturned is information about each breakpoint created by this request.", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the data breakpoints. The array elements correspond to the elements of the input argument 'breakpoints' array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetInstructionBreakpointsRequest": { + "allOf": [ + { "$ref": "#/definitions/Request" }, + { + "type": "object", + "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a diassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a 'stopped' event (with reason 'instruction breakpoint') is generated.\nClients should only call this request if the capability 'supportsInstructionBreakpoints' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "setInstructionBreakpoints" ] + }, + "arguments": { + "$ref": "#/definitions/SetInstructionBreakpointsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetInstructionBreakpointsArguments": { + "type": "object", + "description": "Arguments for 'setInstructionBreakpoints' request", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/InstructionBreakpoint" + }, + "description": "The instruction references of the breakpoints" + } + }, + "required": ["breakpoints"] + }, + "SetInstructionBreakpointsResponse": { + "allOf": [ + { "$ref": "#/definitions/Response" }, + { + "type": "object", + "description": "Response to 'setInstructionBreakpoints' request", + "properties": { + "body": { + "type": "object", + "properties": { + "breakpoints": { + "type": "array", + "items": { + "$ref": "#/definitions/Breakpoint" + }, + "description": "Information about the breakpoints. The array elements correspond to the elements of the 'breakpoints' array." + } + }, + "required": [ "breakpoints" ] + } + }, + "required": [ "body" ] + }] + }, + + "ContinueRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request starts the debuggee to run again.", + "properties": { + "command": { + "type": "string", + "enum": [ "continue" ] + }, + "arguments": { + "$ref": "#/definitions/ContinueArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ContinueArguments": { + "type": "object", + "description": "Arguments for 'continue' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Continue execution for the specified thread (if possible).\nIf the backend cannot continue on a single thread but will continue on all threads, it should set the 'allThreadsContinued' attribute in the response to true." + } + }, + "required": [ "threadId" ] + }, + "ContinueResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'continue' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "allThreadsContinued": { + "type": "boolean", + "description": "If true, the 'continue' request has ignored the specified thread and continued all threads instead.\nIf this attribute is missing a value of 'true' is assumed for backward compatibility." + } + } + } + }, + "required": [ "body" ] + }] + }, + + "NextRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request starts the debuggee to run again for one step.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.", + "properties": { + "command": { + "type": "string", + "enum": [ "next" ] + }, + "arguments": { + "$ref": "#/definitions/NextArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "NextArguments": { + "type": "object", + "description": "Arguments for 'next' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'next' for this thread." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." + } + }, + "required": [ "threadId" ] + }, + "NextResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'next' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StepInRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request starts the debuggee to step into a function/method if possible.\nIf it cannot step into a target, 'stepIn' behaves like 'next'.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.\nIf there are multiple function/method calls (or other targets) on the source line,\nthe optional argument 'targetId' can be used to control into which target the 'stepIn' should occur.\nThe list of possible targets for a given source line can be retrieved via the 'stepInTargets' request.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepIn" ] + }, + "arguments": { + "$ref": "#/definitions/StepInArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepInArguments": { + "type": "object", + "description": "Arguments for 'stepIn' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'stepIn' for this thread." + }, + "targetId": { + "type": "integer", + "description": "Optional id of the target to step into." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." + } + }, + "required": [ "threadId" ] + }, + "StepInResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'stepIn' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StepOutRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request starts the debuggee to run again for one step.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepOut" ] + }, + "arguments": { + "$ref": "#/definitions/StepOutArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepOutArguments": { + "type": "object", + "description": "Arguments for 'stepOut' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'stepOut' for this thread." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." + } + }, + "required": [ "threadId" ] + }, + "StepOutResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'stepOut' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StepBackRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request starts the debuggee to run one step backwards.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'step') after the step has completed.\nClients should only call this request if the capability 'supportsStepBack' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepBack" ] + }, + "arguments": { + "$ref": "#/definitions/StepBackArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepBackArguments": { + "type": "object", + "description": "Arguments for 'stepBack' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'stepBack' for this thread." + }, + "granularity": { + "$ref": "#/definitions/SteppingGranularity", + "description": "Optional granularity to step. If no granularity is specified, a granularity of 'statement' is assumed." + } + }, + "required": [ "threadId" ] + }, + "StepBackResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'stepBack' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "ReverseContinueRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request starts the debuggee to run backward.\nClients should only call this request if the capability 'supportsStepBack' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "reverseContinue" ] + }, + "arguments": { + "$ref": "#/definitions/ReverseContinueArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ReverseContinueArguments": { + "type": "object", + "description": "Arguments for 'reverseContinue' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Execute 'reverseContinue' for this thread." + } + }, + "required": [ "threadId" ] + }, + "ReverseContinueResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'reverseContinue' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "RestartFrameRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request restarts execution of the specified stackframe.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'restart') after the restart has completed.\nClients should only call this request if the capability 'supportsRestartFrame' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "restartFrame" ] + }, + "arguments": { + "$ref": "#/definitions/RestartFrameArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "RestartFrameArguments": { + "type": "object", + "description": "Arguments for 'restartFrame' request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Restart this stackframe." + } + }, + "required": [ "frameId" ] + }, + "RestartFrameResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'restartFrame' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "GotoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request sets the location where the debuggee will continue to run.\nThis makes it possible to skip the execution of code or to executed code again.\nThe code between the current location and the goto target is not executed but skipped.\nThe debug adapter first sends the response and then a 'stopped' event with reason 'goto'.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true (because only then goto targets exist that can be passed as arguments).", + "properties": { + "command": { + "type": "string", + "enum": [ "goto" ] + }, + "arguments": { + "$ref": "#/definitions/GotoArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "GotoArguments": { + "type": "object", + "description": "Arguments for 'goto' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Set the goto target for this thread." + }, + "targetId": { + "type": "integer", + "description": "The location where the debuggee will continue to run." + } + }, + "required": [ "threadId", "targetId" ] + }, + "GotoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'goto' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "PauseRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request suspends the debuggee.\nThe debug adapter first sends the response and then a 'stopped' event (with reason 'pause') after the thread has been paused successfully.", + "properties": { + "command": { + "type": "string", + "enum": [ "pause" ] + }, + "arguments": { + "$ref": "#/definitions/PauseArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "PauseArguments": { + "type": "object", + "description": "Arguments for 'pause' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Pause execution for this thread." + } + }, + "required": [ "threadId" ] + }, + "PauseResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'pause' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "StackTraceRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request returns a stacktrace from the current execution state of a given thread.\nA client can request all stack frames by omitting the startFrame and levels arguments. For performance conscious clients and if the debug adapter's 'supportsDelayedStackTraceLoading' capability is true, stack frames can be retrieved in a piecemeal way with the startFrame and levels arguments. The response of the stackTrace request may contain a totalFrames property that hints at the total number of frames in the stack. If a client needs this total number upfront, it can issue a request for a single (first) frame and depending on the value of totalFrames decide how to proceed. In any case a client should be prepared to receive less frames than requested, which is an indication that the end of the stack has been reached.", + "properties": { + "command": { + "type": "string", + "enum": [ "stackTrace" ] + }, + "arguments": { + "$ref": "#/definitions/StackTraceArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StackTraceArguments": { + "type": "object", + "description": "Arguments for 'stackTrace' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Retrieve the stacktrace for this thread." + }, + "startFrame": { + "type": "integer", + "description": "The index of the first frame to return; if omitted frames start at 0." + }, + "levels": { + "type": "integer", + "description": "The maximum number of frames to return. If levels is not specified or 0, all frames are returned." + }, + "format": { + "$ref": "#/definitions/StackFrameFormat", + "description": "Specifies details on how to format the stack frames.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." + } + }, + "required": [ "threadId" ] + }, + "StackTraceResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'stackTrace' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "stackFrames": { + "type": "array", + "items": { + "$ref": "#/definitions/StackFrame" + }, + "description": "The frames of the stackframe. If the array has length zero, there are no stackframes available.\nThis means that there is no location information available." + }, + "totalFrames": { + "type": "integer", + "description": "The total number of frames available in the stack. If omitted or if totalFrames is larger than the available frames, a client is expected to request frames until a request returns less frames than requested (which indicates the end of the stack). Returning monotonically increasing totalFrames values for subsequent requests can be used to enforce paging in the client." + } + }, + "required": [ "stackFrames" ] + } + }, + "required": [ "body" ] + }] + }, + + "ScopesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request returns the variable scopes for a given stackframe ID.", + "properties": { + "command": { + "type": "string", + "enum": [ "scopes" ] + }, + "arguments": { + "$ref": "#/definitions/ScopesArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ScopesArguments": { + "type": "object", + "description": "Arguments for 'scopes' request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Retrieve the scopes for this stackframe." + } + }, + "required": [ "frameId" ] + }, + "ScopesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'scopes' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "items": { + "$ref": "#/definitions/Scope" + }, + "description": "The scopes of the stackframe. If the array has length zero, there are no scopes available." + } + }, + "required": [ "scopes" ] + } + }, + "required": [ "body" ] + }] + }, + + "VariablesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Retrieves all child variables for the given variable reference.\nAn optional filter can be used to limit the fetched children to either named or indexed children.", + "properties": { + "command": { + "type": "string", + "enum": [ "variables" ] + }, + "arguments": { + "$ref": "#/definitions/VariablesArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "VariablesArguments": { + "type": "object", + "description": "Arguments for 'variables' request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The Variable reference." + }, + "filter": { + "type": "string", + "enum": [ "indexed", "named" ], + "description": "Optional filter to limit the child variables to either named or indexed. If omitted, both types are fetched." + }, + "start": { + "type": "integer", + "description": "The index of the first variable to return; if omitted children start at 0." + }, + "count": { + "type": "integer", + "description": "The number of variables to return. If count is missing or 0, all variables are returned." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the Variable values.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." + } + }, + "required": [ "variablesReference" ] + }, + "VariablesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'variables' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "variables": { + "type": "array", + "items": { + "$ref": "#/definitions/Variable" + }, + "description": "All (or a range) of variables for the given variable reference." + } + }, + "required": [ "variables" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetVariableRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Set the variable with the given name in the variable container to a new value. Clients should only call this request if the capability 'supportsSetVariable' is true.\nIf a debug adapter implements both setVariable and setExpression, a client will only use setExpression if the variable has an evaluateName property.", + "properties": { + "command": { + "type": "string", + "enum": [ "setVariable" ] + }, + "arguments": { + "$ref": "#/definitions/SetVariableArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetVariableArguments": { + "type": "object", + "description": "Arguments for 'setVariable' request.", + "properties": { + "variablesReference": { + "type": "integer", + "description": "The reference of the variable container." + }, + "name": { + "type": "string", + "description": "The name of the variable in the container." + }, + "value": { + "type": "string", + "description": "The value of the variable." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the response value." + } + }, + "required": [ "variablesReference", "name", "value" ] + }, + "SetVariableResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'setVariable' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The new value of the variable." + }, + "type": { + "type": "string", + "description": "The type of the new value. Typically shown in the UI when hovering over the value." + }, + "variablesReference": { + "type": "integer", + "description": "If variablesReference is > 0, the new value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + } + }, + "required": [ "value" ] + } + }, + "required": [ "body" ] + }] + }, + + "SourceRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request retrieves the source code for a given source reference.", + "properties": { + "command": { + "type": "string", + "enum": [ "source" ] + }, + "arguments": { + "$ref": "#/definitions/SourceArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SourceArguments": { + "type": "object", + "description": "Arguments for 'source' request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "Specifies the source content to load. Either source.path or source.sourceReference must be specified." + }, + "sourceReference": { + "type": "integer", + "description": "The reference to the source. This is the same as source.sourceReference.\nThis is provided for backward compatibility since old backends do not understand the 'source' attribute." + } + }, + "required": [ "sourceReference" ] + }, + "SourceResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'source' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Content of the source reference." + }, + "mimeType": { + "type": "string", + "description": "Optional content type (mime type) of the source." + } + }, + "required": [ "content" ] + } + }, + "required": [ "body" ] + }] + }, + + "ThreadsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request retrieves a list of all threads.", + "properties": { + "command": { + "type": "string", + "enum": [ "threads" ] + } + }, + "required": [ "command" ] + }] + }, + "ThreadsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'threads' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "threads": { + "type": "array", + "items": { + "$ref": "#/definitions/Thread" + }, + "description": "All threads." + } + }, + "required": [ "threads" ] + } + }, + "required": [ "body" ] + }] + }, + + "TerminateThreadsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "The request terminates the threads with the given ids.\nClients should only call this request if the capability 'supportsTerminateThreadsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "terminateThreads" ] + }, + "arguments": { + "$ref": "#/definitions/TerminateThreadsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "TerminateThreadsArguments": { + "type": "object", + "description": "Arguments for 'terminateThreads' request.", + "properties": { + "threadIds": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Ids of threads to be terminated." + } + } + }, + "TerminateThreadsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'terminateThreads' request. This is just an acknowledgement, so no body field is required." + }] + }, + + "ModulesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Modules can be retrieved from the debug adapter with this request which can either return all modules or a range of modules to support paging.\nClients should only call this request if the capability 'supportsModulesRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "modules" ] + }, + "arguments": { + "$ref": "#/definitions/ModulesArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ModulesArguments": { + "type": "object", + "description": "Arguments for 'modules' request.", + "properties": { + "startModule": { + "type": "integer", + "description": "The index of the first module to return; if omitted modules start at 0." + }, + "moduleCount": { + "type": "integer", + "description": "The number of modules to return. If moduleCount is not specified or 0, all modules are returned." + } + } + }, + "ModulesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'modules' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "modules": { + "type": "array", + "items": { + "$ref": "#/definitions/Module" + }, + "description": "All modules or range of modules." + }, + "totalModules": { + "type": "integer", + "description": "The total number of modules available." + } + }, + "required": [ "modules" ] + } + }, + "required": [ "body" ] + }] + }, + + "LoadedSourcesRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Retrieves the set of all sources currently loaded by the debugged process.\nClients should only call this request if the capability 'supportsLoadedSourcesRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "loadedSources" ] + }, + "arguments": { + "$ref": "#/definitions/LoadedSourcesArguments" + } + }, + "required": [ "command" ] + }] + }, + "LoadedSourcesArguments": { + "type": "object", + "description": "Arguments for 'loadedSources' request." + }, + "LoadedSourcesResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'loadedSources' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "Set of loaded sources." + } + }, + "required": [ "sources" ] + } + }, + "required": [ "body" ] + }] + }, + + "EvaluateRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Evaluates the given expression in the context of the top most stack frame.\nThe expression has access to any variables and arguments that are in scope.", + "properties": { + "command": { + "type": "string", + "enum": [ "evaluate" ] + }, + "arguments": { + "$ref": "#/definitions/EvaluateArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "EvaluateArguments": { + "type": "object", + "description": "Arguments for 'evaluate' request.", + "properties": { + "expression": { + "type": "string", + "description": "The expression to evaluate." + }, + "frameId": { + "type": "integer", + "description": "Evaluate the expression in the scope of this stack frame. If not specified, the expression is evaluated in the global scope." + }, + "context": { + "type": "string", + "_enum": [ "watch", "repl", "hover", "clipboard" ], + "enumDescriptions": [ + "evaluate is run in a watch.", + "evaluate is run from REPL console.", + "evaluate is run from a data hover.", + "evaluate is run to generate the value that will be stored in the clipboard.\nThe attribute is only honored by a debug adapter if the capability 'supportsClipboardContext' is true." + ], + "description": "The context in which the evaluate request is run." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies details on how to format the Evaluate result.\nThe attribute is only honored by a debug adapter if the capability 'supportsValueFormattingOptions' is true." + } + }, + "required": [ "expression" ] + }, + "EvaluateResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'evaluate' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "result": { + "type": "string", + "description": "The result of the evaluate request." + }, + "type": { + "type": "string", + "description": "The optional type of the evaluate result.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a evaluate result that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If variablesReference is > 0, the evaluate result is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "memoryReference": { + "type": "string", + "description": "Optional memory reference to a location appropriate for this result.\nFor pointer type eval results, this is generally a reference to the memory address contained in the pointer.\nThis attribute should be returned by a debug adapter if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." + } + }, + "required": [ "result", "variablesReference" ] + } + }, + "required": [ "body" ] + }] + }, + + "SetExpressionRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Evaluates the given 'value' expression and assigns it to the 'expression' which must be a modifiable l-value.\nThe expressions have access to any variables and arguments that are in scope of the specified frame.\nClients should only call this request if the capability 'supportsSetExpression' is true.\nIf a debug adapter implements both setExpression and setVariable, a client will only use setExpression if the variable has an evaluateName property.", + "properties": { + "command": { + "type": "string", + "enum": [ "setExpression" ] + }, + "arguments": { + "$ref": "#/definitions/SetExpressionArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "SetExpressionArguments": { + "type": "object", + "description": "Arguments for 'setExpression' request.", + "properties": { + "expression": { + "type": "string", + "description": "The l-value expression to assign to." + }, + "value": { + "type": "string", + "description": "The value expression to assign to the l-value expression." + }, + "frameId": { + "type": "integer", + "description": "Evaluate the expressions in the scope of this stack frame. If not specified, the expressions are evaluated in the global scope." + }, + "format": { + "$ref": "#/definitions/ValueFormat", + "description": "Specifies how the resulting value should be formatted." + } + }, + "required": [ "expression", "value" ] + }, + "SetExpressionResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'setExpression' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The new value of the expression." + }, + "type": { + "type": "string", + "description": "The optional type of the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a value that can be used to determine how to render the result in the UI." + }, + "variablesReference": { + "type": "integer", + "description": "If variablesReference is > 0, the value is structured and its children can be retrieved by passing variablesReference to the VariablesRequest.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks.\nThe value should be less than or equal to 2147483647 (2^31-1)." + } + }, + "required": [ "value" ] + } + }, + "required": [ "body" ] + }] + }, + + "StepInTargetsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This request retrieves the possible stepIn targets for the specified stack frame.\nThese targets can be used in the 'stepIn' request.\nThe StepInTargets may only be called if the 'supportsStepInTargetsRequest' capability exists and is true.\nClients should only call this request if the capability 'supportsStepInTargetsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "stepInTargets" ] + }, + "arguments": { + "$ref": "#/definitions/StepInTargetsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "StepInTargetsArguments": { + "type": "object", + "description": "Arguments for 'stepInTargets' request.", + "properties": { + "frameId": { + "type": "integer", + "description": "The stack frame for which to retrieve the possible stepIn targets." + } + }, + "required": [ "frameId" ] + }, + "StepInTargetsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'stepInTargets' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/StepInTarget" + }, + "description": "The possible stepIn targets of the specified source location." + } + }, + "required": [ "targets" ] + } + }, + "required": [ "body" ] + }] + }, + + "GotoTargetsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "This request retrieves the possible goto targets for the specified source location.\nThese targets can be used in the 'goto' request.\nClients should only call this request if the capability 'supportsGotoTargetsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "gotoTargets" ] + }, + "arguments": { + "$ref": "#/definitions/GotoTargetsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "GotoTargetsArguments": { + "type": "object", + "description": "Arguments for 'gotoTargets' request.", + "properties": { + "source": { + "$ref": "#/definitions/Source", + "description": "The source location for which the goto targets are determined." + }, + "line": { + "type": "integer", + "description": "The line location for which the goto targets are determined." + }, + "column": { + "type": "integer", + "description": "An optional column location for which the goto targets are determined." + } + }, + "required": [ "source", "line" ] + }, + "GotoTargetsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'gotoTargets' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/GotoTarget" + }, + "description": "The possible goto targets of the specified location." + } + }, + "required": [ "targets" ] + } + }, + "required": [ "body" ] + }] + }, + + "CompletionsRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Returns a list of possible completions for a given caret position and text.\nClients should only call this request if the capability 'supportsCompletionsRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "completions" ] + }, + "arguments": { + "$ref": "#/definitions/CompletionsArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "CompletionsArguments": { + "type": "object", + "description": "Arguments for 'completions' request.", + "properties": { + "frameId": { + "type": "integer", + "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope." + }, + "text": { + "type": "string", + "description": "One or more source lines. Typically this is the text a user has typed into the debug console before he asked for completion." + }, + "column": { + "type": "integer", + "description": "The character position for which to determine the completion proposals." + }, + "line": { + "type": "integer", + "description": "An optional line for which to determine the completion proposals. If missing the first line of the text is assumed." + } + }, + "required": [ "text", "column" ] + }, + "CompletionsResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'completions' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "targets": { + "type": "array", + "items": { + "$ref": "#/definitions/CompletionItem" + }, + "description": "The possible completions for ." + } + }, + "required": [ "targets" ] + } + }, + "required": [ "body" ] + }] + }, + + "ExceptionInfoRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Retrieves the details of the exception that caused this event to be raised.\nClients should only call this request if the capability 'supportsExceptionInfoRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "exceptionInfo" ] + }, + "arguments": { + "$ref": "#/definitions/ExceptionInfoArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ExceptionInfoArguments": { + "type": "object", + "description": "Arguments for 'exceptionInfo' request.", + "properties": { + "threadId": { + "type": "integer", + "description": "Thread for which exception information should be retrieved." + } + }, + "required": [ "threadId" ] + }, + "ExceptionInfoResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'exceptionInfo' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "exceptionId": { + "type": "string", + "description": "ID of the exception that was thrown." + }, + "description": { + "type": "string", + "description": "Descriptive text for the exception provided by the debug adapter." + }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Mode that caused the exception notification to be raised." + }, + "details": { + "$ref": "#/definitions/ExceptionDetails", + "description": "Detailed information about the exception." + } + }, + "required": [ "exceptionId", "breakMode" ] + } + }, + "required": [ "body" ] + }] + }, + + "ReadMemoryRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Reads bytes from memory at the provided location.\nClients should only call this request if the capability 'supportsReadMemoryRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "readMemory" ] + }, + "arguments": { + "$ref": "#/definitions/ReadMemoryArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "ReadMemoryArguments": { + "type": "object", + "description": "Arguments for 'readMemory' request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location from which data should be read." + }, + "offset": { + "type": "integer", + "description": "Optional offset (in bytes) to be applied to the reference location before reading data. Can be negative." + }, + "count": { + "type": "integer", + "description": "Number of bytes to read at the specified location and offset." + } + }, + "required": [ "memoryReference", "count" ] + }, + "ReadMemoryResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'readMemory' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The address of the first byte of data returned.\nTreated as a hex value if prefixed with '0x', or as a decimal value otherwise." + }, + "unreadableBytes": { + "type": "integer", + "description": "The number of unreadable bytes encountered after the last successfully read byte.\nThis can be used to determine the number of bytes that must be skipped before a subsequent 'readMemory' request will succeed." + }, + "data": { + "type": "string", + "description": "The bytes read from memory, encoded using base64." + } + }, + "required": [ "address" ] + } + } + }] + }, + + "DisassembleRequest": { + "allOf": [ { "$ref": "#/definitions/Request" }, { + "type": "object", + "description": "Disassembles code stored at the provided location.\nClients should only call this request if the capability 'supportsDisassembleRequest' is true.", + "properties": { + "command": { + "type": "string", + "enum": [ "disassemble" ] + }, + "arguments": { + "$ref": "#/definitions/DisassembleArguments" + } + }, + "required": [ "command", "arguments" ] + }] + }, + "DisassembleArguments": { + "type": "object", + "description": "Arguments for 'disassemble' request.", + "properties": { + "memoryReference": { + "type": "string", + "description": "Memory reference to the base location containing the instructions to disassemble." + }, + "offset": { + "type": "integer", + "description": "Optional offset (in bytes) to be applied to the reference location before disassembling. Can be negative." + }, + "instructionOffset": { + "type": "integer", + "description": "Optional offset (in instructions) to be applied after the byte offset (if any) before disassembling. Can be negative." + }, + "instructionCount": { + "type": "integer", + "description": "Number of instructions to disassemble starting at the specified location and offset.\nAn adapter must return exactly this number of instructions - any unavailable instructions should be replaced with an implementation-defined 'invalid instruction' value." + }, + "resolveSymbols": { + "type": "boolean", + "description": "If true, the adapter should attempt to resolve memory addresses and other values to symbolic names." + } + }, + "required": [ "memoryReference", "instructionCount" ] + }, + "DisassembleResponse": { + "allOf": [ { "$ref": "#/definitions/Response" }, { + "type": "object", + "description": "Response to 'disassemble' request.", + "properties": { + "body": { + "type": "object", + "properties": { + "instructions": { + "type": "array", + "items": { + "$ref": "#/definitions/DisassembledInstruction" + }, + "description": "The list of disassembled instructions." + } + }, + "required": [ "instructions" ] + } + } + }] + }, + + "Capabilities": { + "type": "object", + "title": "Types", + "description": "Information about the capabilities of a debug adapter.", + "properties": { + "supportsConfigurationDoneRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'configurationDone' request." + }, + "supportsFunctionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports function breakpoints." + }, + "supportsConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports conditional breakpoints." + }, + "supportsHitConditionalBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports breakpoints that break execution after a specified number of hits." + }, + "supportsEvaluateForHovers": { + "type": "boolean", + "description": "The debug adapter supports a (side effect free) evaluate request for data hovers." + }, + "exceptionBreakpointFilters": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionBreakpointsFilter" + }, + "description": "Available exception filter options for the 'setExceptionBreakpoints' request." + }, + "supportsStepBack": { + "type": "boolean", + "description": "The debug adapter supports stepping back via the 'stepBack' and 'reverseContinue' requests." + }, + "supportsSetVariable": { + "type": "boolean", + "description": "The debug adapter supports setting a variable to a value." + }, + "supportsRestartFrame": { + "type": "boolean", + "description": "The debug adapter supports restarting a frame." + }, + "supportsGotoTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'gotoTargets' request." + }, + "supportsStepInTargetsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'stepInTargets' request." + }, + "supportsCompletionsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'completions' request." + }, + "completionTriggerCharacters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The set of characters that should trigger completion in a REPL. If not specified, the UI should assume the '.' character." + }, + "supportsModulesRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'modules' request." + }, + "additionalModuleColumns": { + "type": "array", + "items": { + "$ref": "#/definitions/ColumnDescriptor" + }, + "description": "The set of additional module information exposed by the debug adapter." + }, + "supportedChecksumAlgorithms": { + "type": "array", + "items": { + "$ref": "#/definitions/ChecksumAlgorithm" + }, + "description": "Checksum algorithms supported by the debug adapter." + }, + "supportsRestartRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'restart' request. In this case a client should not implement 'restart' by terminating and relaunching the adapter but by calling the RestartRequest." + }, + "supportsExceptionOptions": { + "type": "boolean", + "description": "The debug adapter supports 'exceptionOptions' on the setExceptionBreakpoints request." + }, + "supportsValueFormattingOptions": { + "type": "boolean", + "description": "The debug adapter supports a 'format' attribute on the stackTraceRequest, variablesRequest, and evaluateRequest." + }, + "supportsExceptionInfoRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'exceptionInfo' request." + }, + "supportTerminateDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request." + }, + "supportSuspendDebuggee": { + "type": "boolean", + "description": "The debug adapter supports the 'suspendDebuggee' attribute on the 'disconnect' request." + }, + "supportsDelayedStackTraceLoading": { + "type": "boolean", + "description": "The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and an optional 'totalFrames' result of the 'StackTrace' request are supported." + }, + "supportsLoadedSourcesRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'loadedSources' request." + }, + "supportsLogPoints": { + "type": "boolean", + "description": "The debug adapter supports logpoints by interpreting the 'logMessage' attribute of the SourceBreakpoint." + }, + "supportsTerminateThreadsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'terminateThreads' request." + }, + "supportsSetExpression": { + "type": "boolean", + "description": "The debug adapter supports the 'setExpression' request." + }, + "supportsTerminateRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'terminate' request." + }, + "supportsDataBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports data breakpoints." + }, + "supportsReadMemoryRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'readMemory' request." + }, + "supportsDisassembleRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'disassemble' request." + }, + "supportsCancelRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'cancel' request." + }, + "supportsBreakpointLocationsRequest": { + "type": "boolean", + "description": "The debug adapter supports the 'breakpointLocations' request." + }, + "supportsClipboardContext": { + "type": "boolean", + "description": "The debug adapter supports the 'clipboard' context value in the 'evaluate' request." + }, + "supportsSteppingGranularity": { + "type": "boolean", + "description": "The debug adapter supports stepping granularities (argument 'granularity') for the stepping requests." + }, + "supportsInstructionBreakpoints": { + "type": "boolean", + "description": "The debug adapter supports adding breakpoints based on instruction references." + }, + "supportsExceptionFilterOptions": { + "type": "boolean", + "description": "The debug adapter supports 'filterOptions' as an argument on the 'setExceptionBreakpoints' request." + } + } + }, + + "ExceptionBreakpointsFilter": { + "type": "object", + "description": "An ExceptionBreakpointsFilter is shown in the UI as an filter option for configuring how exceptions are dealt with.", + "properties": { + "filter": { + "type": "string", + "description": "The internal ID of the filter option. This value is passed to the 'setExceptionBreakpoints' request." + }, + "label": { + "type": "string", + "description": "The name of the filter option. This will be shown in the UI." + }, + "description": { + "type": "string", + "description": "An optional help text providing additional information about the exception filter. This string is typically shown as a hover and must be translated." + }, + "default": { + "type": "boolean", + "description": "Initial value of the filter option. If not specified a value 'false' is assumed." + }, + "supportsCondition": { + "type": "boolean", + "description": "Controls whether a condition can be specified for this filter option. If false or missing, a condition can not be set." + }, + "conditionDescription": { + "type": "string", + "description": "An optional help text providing information about the condition. This string is shown as the placeholder text for a text box and must be translated." + } + }, + "required": [ "filter", "label" ] + }, + + "Message": { + "type": "object", + "description": "A structured message object. Used to return errors from requests.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for the message." + }, + "format": { + "type": "string", + "description": "A format string for the message. Embedded variables have the form '{name}'.\nIf variable name starts with an underscore character, the variable does not contain user data (PII) and can be safely used for telemetry purposes." + }, + "variables": { + "type": "object", + "description": "An object used as a dictionary for looking up the variables in the format string.", + "additionalProperties": { + "type": "string", + "description": "Values must be strings." + } + }, + "sendTelemetry": { + "type": "boolean", + "description": "If true send to telemetry." + }, + "showUser": { + "type": "boolean", + "description": "If true show user." + }, + "url": { + "type": "string", + "description": "An optional url where additional information about this message can be found." + }, + "urlLabel": { + "type": "string", + "description": "An optional label that is presented to the user as the UI for opening the url." + } + }, + "required": [ "id", "format" ] + }, + + "Module": { + "type": "object", + "description": "A Module object represents a row in the modules view.\nTwo attributes are mandatory: an id identifies a module in the modules view and is used in a ModuleEvent for identifying a module for adding, updating or deleting.\nThe name is used to minimally render the module in the UI.\n\nAdditional attributes can be added to the module. They will show up in the module View if they have a corresponding ColumnDescriptor.\n\nTo avoid an unnecessary proliferation of additional attributes with similar semantics but different names\nwe recommend to re-use attributes from the 'recommended' list below first, and only introduce new attributes if nothing appropriate could be found.", + "properties": { + "id": { + "type": ["integer", "string"], + "description": "Unique identifier for the module." + }, + "name": { + "type": "string", + "description": "A name of the module." + }, + "path": { + "type": "string", + "description": "optional but recommended attributes.\nalways try to use these first before introducing additional attributes.\n\nLogical full path to the module. The exact definition is implementation defined, but usually this would be a full path to the on-disk file for the module." + }, + "isOptimized": { + "type": "boolean", + "description": "True if the module is optimized." + }, + "isUserCode": { + "type": "boolean", + "description": "True if the module is considered 'user code' by a debugger that supports 'Just My Code'." + }, + "version": { + "type": "string", + "description": "Version of Module." + }, + "symbolStatus": { + "type": "string", + "description": "User understandable description of if symbols were found for the module (ex: 'Symbols Loaded', 'Symbols not found', etc." + }, + "symbolFilePath": { + "type": "string", + "description": "Logical full path to the symbol file. The exact definition is implementation defined." + }, + "dateTimeStamp": { + "type": "string", + "description": "Module created or modified." + }, + "addressRange": { + "type": "string", + "description": "Address range covered by this module." + } + }, + "required": [ "id", "name" ] + }, + + "ColumnDescriptor": { + "type": "object", + "description": "A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, how to format it,\nand what the column's label should be.\nIt is only used if the underlying UI actually supports this level of customization.", + "properties": { + "attributeName": { + "type": "string", + "description": "Name of the attribute rendered in this column." + }, + "label": { + "type": "string", + "description": "Header UI label of column." + }, + "format": { + "type": "string", + "description": "Format to use for the rendered values in this column. TBD how the format strings looks like." + }, + "type": { + "type": "string", + "enum": [ "string", "number", "boolean", "unixTimestampUTC" ], + "description": "Datatype of values in this column. Defaults to 'string' if not specified." + }, + "width": { + "type": "integer", + "description": "Width of this column in characters (hint only)." + } + }, + "required": [ "attributeName", "label"] + }, + + "ModulesViewDescriptor": { + "type": "object", + "description": "The ModulesViewDescriptor is the container for all declarative configuration options of a ModuleView.\nFor now it only specifies the columns to be shown in the modules view.", + "properties": { + "columns": { + "type": "array", + "items": { + "$ref": "#/definitions/ColumnDescriptor" + } + } + }, + "required": [ "columns" ] + }, + + "Thread": { + "type": "object", + "description": "A Thread", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for the thread." + }, + "name": { + "type": "string", + "description": "A name of the thread." + } + }, + "required": [ "id", "name" ] + }, + + "Source": { + "type": "object", + "description": "A Source is a descriptor for source code.\nIt is returned from the debug adapter as part of a StackFrame and it is used by clients when specifying breakpoints.", + "properties": { + "name": { + "type": "string", + "description": "The short name of the source. Every source returned from the debug adapter has a name.\nWhen sending a source to the debug adapter this name is optional." + }, + "path": { + "type": "string", + "description": "The path of the source to be shown in the UI.\nIt is only used to locate and load the content of the source if no sourceReference is specified (or its value is 0)." + }, + "sourceReference": { + "type": "integer", + "description": "If sourceReference > 0 the contents of the source must be retrieved through the SourceRequest (even if a path is specified).\nA sourceReference is only valid for a session, so it must not be used to persist a source.\nThe value should be less than or equal to 2147483647 (2^31-1)." + }, + "presentationHint": { + "type": "string", + "description": "An optional hint for how to present the source in the UI.\nA value of 'deemphasize' can be used to indicate that the source is not available or that it is skipped on stepping.", + "enum": [ "normal", "emphasize", "deemphasize" ] + }, + "origin": { + "type": "string", + "description": "The (optional) origin of this source: possible values 'internal module', 'inlined content from source map', etc." + }, + "sources": { + "type": "array", + "items": { + "$ref": "#/definitions/Source" + }, + "description": "An optional list of sources that are related to this source. These may be the source that generated this source." + }, + "adapterData": { + "type": [ "array", "boolean", "integer", "null", "number", "object", "string" ], + "description": "Optional data that a debug adapter might want to loop through the client.\nThe client should leave the data intact and persist it across sessions. The client should not interpret the data." + }, + "checksums": { + "type": "array", + "items": { + "$ref": "#/definitions/Checksum" + }, + "description": "The checksums associated with this file." + } + } + }, + + "StackFrame": { + "type": "object", + "description": "A Stackframe contains the source location.", + "properties": { + "id": { + "type": "integer", + "description": "An identifier for the stack frame. It must be unique across all threads.\nThis id can be used to retrieve the scopes of the frame with the 'scopesRequest' or to restart the execution of a stackframe." + }, + "name": { + "type": "string", + "description": "The name of the stack frame, typically a method name." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The optional source of the frame." + }, + "line": { + "type": "integer", + "description": "The line within the file of the frame. If source is null or doesn't exist, line is 0 and must be ignored." + }, + "column": { + "type": "integer", + "description": "The column within the line. If source is null or doesn't exist, column is 0 and must be ignored." + }, + "endLine": { + "type": "integer", + "description": "An optional end line of the range covered by the stack frame." + }, + "endColumn": { + "type": "integer", + "description": "An optional end column of the range covered by the stack frame." + }, + "canRestart": { + "type": "boolean", + "description": "Indicates whether this frame can be restarted with the 'restart' request. Clients should only use this if the debug adapter supports the 'restart' request (capability 'supportsRestartRequest' is true)." + }, + "instructionPointerReference": { + "type": "string", + "description": "Optional memory reference for the current instruction pointer in this frame." + }, + "moduleId": { + "type": ["integer", "string"], + "description": "The module associated with this frame, if any." + }, + "presentationHint": { + "type": "string", + "enum": [ "normal", "label", "subtle" ], + "description": "An optional hint for how to present this frame in the UI.\nA value of 'label' can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of 'subtle' can be used to change the appearance of a frame in a 'subtle' way." + } + }, + "required": [ "id", "name", "line", "column" ] + }, + + "Scope": { + "type": "object", + "description": "A Scope is a named container for variables. Optionally a scope can map to a source or a range within a source.", + "properties": { + "name": { + "type": "string", + "description": "Name of the scope such as 'Arguments', 'Locals', or 'Registers'. This string is shown in the UI as is and can be translated." + }, + "presentationHint": { + "type": "string", + "description": "An optional hint for how to present this scope in the UI. If this attribute is missing, the scope is shown with a generic UI.", + "_enum": [ "arguments", "locals", "registers" ], + "enumDescriptions": [ + "Scope contains method arguments.", + "Scope contains local variables.", + "Scope contains registers. Only a single 'registers' scope should be returned from a 'scopes' request." + ] + }, + "variablesReference": { + "type": "integer", + "description": "The variables of this scope can be retrieved by passing the value of variablesReference to the VariablesRequest." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named variables in this scope.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed variables in this scope.\nThe client can use this optional information to present the variables in a paged UI and fetch them in chunks." + }, + "expensive": { + "type": "boolean", + "description": "If true, the number of variables in this scope is large or expensive to retrieve." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "Optional source for this scope." + }, + "line": { + "type": "integer", + "description": "Optional start line of the range covered by this scope." + }, + "column": { + "type": "integer", + "description": "Optional start column of the range covered by this scope." + }, + "endLine": { + "type": "integer", + "description": "Optional end line of the range covered by this scope." + }, + "endColumn": { + "type": "integer", + "description": "Optional end column of the range covered by this scope." + } + }, + "required": [ "name", "variablesReference", "expensive" ] + }, + + "Variable": { + "type": "object", + "description": "A Variable is a name/value pair.\nOptionally a variable can have a 'type' that is shown if space permits or when hovering over the variable's name.\nAn optional 'kind' is used to render additional properties of the variable, e.g. different icons can be used to indicate that a variable is public or private.\nIf the value is structured (has children), a handle is provided to retrieve the children with the VariablesRequest.\nIf the number of named or indexed children is large, the numbers should be returned via the optional 'namedVariables' and 'indexedVariables' attributes.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks.", + "properties": { + "name": { + "type": "string", + "description": "The variable's name." + }, + "value": { + "type": "string", + "description": "The variable's value. This can be a multi-line text, e.g. for a function the body of a function." + }, + "type": { + "type": "string", + "description": "The type of the variable's value. Typically shown in the UI when hovering over the value.\nThis attribute should only be returned by a debug adapter if the client has passed the value true for the 'supportsVariableType' capability of the 'initialize' request." + }, + "presentationHint": { + "$ref": "#/definitions/VariablePresentationHint", + "description": "Properties of a variable that can be used to determine how to render the variable in the UI." + }, + "evaluateName": { + "type": "string", + "description": "Optional evaluatable name of this variable which can be passed to the 'EvaluateRequest' to fetch the variable's value." + }, + "variablesReference": { + "type": "integer", + "description": "If variablesReference is > 0, the variable is structured and its children can be retrieved by passing variablesReference to the VariablesRequest." + }, + "namedVariables": { + "type": "integer", + "description": "The number of named child variables.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks." + }, + "indexedVariables": { + "type": "integer", + "description": "The number of indexed child variables.\nThe client can use this optional information to present the children in a paged UI and fetch them in chunks." + }, + "memoryReference": { + "type": "string", + "description": "Optional memory reference for the variable if the variable represents executable code, such as a function pointer.\nThis attribute is only required if the client has passed the value true for the 'supportsMemoryReferences' capability of the 'initialize' request." + } + }, + "required": [ "name", "value", "variablesReference" ] + }, + + "VariablePresentationHint": { + "type": "object", + "description": "Optional properties of a variable that can be used to determine how to render the variable in the UI.", + "properties": { + "kind": { + "description": "The kind of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ "property", "method", "class", "data", "event", "baseClass", "innerClass", "interface", "mostDerivedClass", "virtual", "dataBreakpoint" ], + "enumDescriptions": [ + "Indicates that the object is a property.", + "Indicates that the object is a method.", + "Indicates that the object is a class.", + "Indicates that the object is data.", + "Indicates that the object is an event.", + "Indicates that the object is a base class.", + "Indicates that the object is an inner class.", + "Indicates that the object is an interface.", + "Indicates that the object is the most derived class.", + "Indicates that the object is virtual, that means it is a synthetic object introducedby the\nadapter for rendering purposes, e.g. an index range for large arrays.", + "Deprecated: Indicates that a data breakpoint is registered for the object. The 'hasDataBreakpoint' attribute should generally be used instead." + ] + }, + "attributes": { + "description": "Set of attributes represented as an array of strings. Before introducing additional values, try to use the listed values.", + "type": "array", + "items": { + "type": "string", + "_enum": [ "static", "constant", "readOnly", "rawString", "hasObjectId", "canHaveObjectId", "hasSideEffects", "hasDataBreakpoint" ], + "enumDescriptions": [ + "Indicates that the object is static.", + "Indicates that the object is a constant.", + "Indicates that the object is read only.", + "Indicates that the object is a raw string.", + "Indicates that the object can have an Object ID created for it.", + "Indicates that the object has an Object ID associated with it.", + "Indicates that the evaluation had side effects.", + "Indicates that the object has its value tracked by a data breakpoint." + ] + } + }, + "visibility": { + "description": "Visibility of variable. Before introducing additional values, try to use the listed values.", + "type": "string", + "_enum": [ "public", "private", "protected", "internal", "final" ] + } + } + }, + + "BreakpointLocation": { + "type": "object", + "description": "Properties of a breakpoint location returned from the 'breakpointLocations' request.", + "properties": { + "line": { + "type": "integer", + "description": "Start line of breakpoint location." + }, + "column": { + "type": "integer", + "description": "Optional start column of breakpoint location." + }, + "endLine": { + "type": "integer", + "description": "Optional end line of breakpoint location if the location covers a range." + }, + "endColumn": { + "type": "integer", + "description": "Optional end column of breakpoint location if the location covers a range." + } + }, + "required": [ "line" ] + }, + + "SourceBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint or logpoint passed to the setBreakpoints request.", + "properties": { + "line": { + "type": "integer", + "description": "The source line of the breakpoint or logpoint." + }, + "column": { + "type": "integer", + "description": "An optional source column of the breakpoint." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." + }, + "logMessage": { + "type": "string", + "description": "If this attribute exists and is non-empty, the backend must not 'break' (stop)\nbut log the message instead. Expressions within {} are interpolated.\nThe attribute is only honored by a debug adapter if the capability 'supportsLogPoints' is true." + } + }, + "required": [ "line" ] + }, + + "FunctionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the setFunctionBreakpoints request.", + "properties": { + "name": { + "type": "string", + "description": "The name of the function." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." + } + }, + "required": [ "name" ] + }, + + "DataBreakpointAccessType": { + "type": "string", + "description": "This enumeration defines all possible access types for data breakpoints.", + "enum": [ "read", "write", "readWrite" ] + }, + + "DataBreakpoint": { + "type": "object", + "description": "Properties of a data breakpoint passed to the setDataBreakpoints request.", + "properties": { + "dataId": { + "type": "string", + "description": "An id representing the data. This id is returned from the dataBreakpointInfo request." + }, + "accessType": { + "$ref": "#/definitions/DataBreakpointAccessType", + "description": "The access type of the data." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed." + } + }, + "required": [ "dataId" ] + }, + + "InstructionBreakpoint": { + "type": "object", + "description": "Properties of a breakpoint passed to the setInstructionBreakpoints request", + "properties": { + "instructionReference": { + "type": "string", + "description": "The instruction reference of the breakpoint.\nThis should be a memory or instruction pointer reference from an EvaluateResponse, Variable, StackFrame, GotoTarget, or Breakpoint." + }, + "offset": { + "type": "integer", + "description": "An optional offset from the instruction reference.\nThis can be negative." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional breakpoints.\nIt is only honored by a debug adapter if the capability 'supportsConditionalBreakpoints' is true." + }, + "hitCondition": { + "type": "string", + "description": "An optional expression that controls how many hits of the breakpoint are ignored.\nThe backend is expected to interpret the expression as needed.\nThe attribute is only honored by a debug adapter if the capability 'supportsHitConditionalBreakpoints' is true." + } + }, + "required": [ "instructionReference" ] + }, + + "Breakpoint": { + "type": "object", + "description": "Information about a Breakpoint created in setBreakpoints, setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints.", + "properties": { + "id": { + "type": "integer", + "description": "An optional identifier for the breakpoint. It is needed if breakpoint events are used to update or remove breakpoints." + }, + "verified": { + "type": "boolean", + "description": "If true breakpoint could be set (but not necessarily at the desired location)." + }, + "message": { + "type": "string", + "description": "An optional message about the state of the breakpoint.\nThis is shown to the user and can be used to explain why a breakpoint could not be verified." + }, + "source": { + "$ref": "#/definitions/Source", + "description": "The source where the breakpoint is located." + }, + "line": { + "type": "integer", + "description": "The start line of the actual range covered by the breakpoint." + }, + "column": { + "type": "integer", + "description": "An optional start column of the actual range covered by the breakpoint." + }, + "endLine": { + "type": "integer", + "description": "An optional end line of the actual range covered by the breakpoint." + }, + "endColumn": { + "type": "integer", + "description": "An optional end column of the actual range covered by the breakpoint.\nIf no end line is given, then the end column is assumed to be in the start line." + }, + "instructionReference": { + "type": "string", + "description": "An optional memory reference to where the breakpoint is set." + }, + "offset": { + "type": "integer", + "description": "An optional offset from the instruction reference.\nThis can be negative." + } + }, + "required": [ "verified" ] + }, + + "SteppingGranularity": { + "type": "string", + "description": "The granularity of one 'step' in the stepping requests 'next', 'stepIn', 'stepOut', and 'stepBack'.", + "enum": [ "statement", "line", "instruction" ], + "enumDescriptions": [ + "The step should allow the program to run until the current statement has finished executing.\nThe meaning of a statement is determined by the adapter and it may be considered equivalent to a line.\nFor example 'for(int i = 0; i < 10; i++) could be considered to have 3 statements 'int i = 0', 'i < 10', and 'i++'.", + "The step should allow the program to run until the current source line has executed.", + "The step should allow one instruction to execute (e.g. one x86 instruction)." + ] + }, + + "StepInTarget": { + "type": "object", + "description": "A StepInTarget can be used in the 'stepIn' request and determines into which single target the stepIn request should step.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for a stepIn target." + }, + "label": { + "type": "string", + "description": "The name of the stepIn target (shown in the UI)." + } + }, + "required": [ "id", "label" ] + }, + + "GotoTarget": { + "type": "object", + "description": "A GotoTarget describes a code location that can be used as a target in the 'goto' request.\nThe possible goto targets can be determined via the 'gotoTargets' request.", + "properties": { + "id": { + "type": "integer", + "description": "Unique identifier for a goto target. This is used in the goto request." + }, + "label": { + "type": "string", + "description": "The name of the goto target (shown in the UI)." + }, + "line": { + "type": "integer", + "description": "The line of the goto target." + }, + "column": { + "type": "integer", + "description": "An optional column of the goto target." + }, + "endLine": { + "type": "integer", + "description": "An optional end line of the range covered by the goto target." + }, + "endColumn": { + "type": "integer", + "description": "An optional end column of the range covered by the goto target." + }, + "instructionPointerReference": { + "type": "string", + "description": "Optional memory reference for the instruction pointer value represented by this target." + } + }, + "required": [ "id", "label", "line" ] + }, + + "CompletionItem": { + "type": "object", + "description": "CompletionItems are the suggestions returned from the CompletionsRequest.", + "properties": { + "label": { + "type": "string", + "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion." + }, + "text": { + "type": "string", + "description": "If text is not falsy then it is inserted instead of the label." + }, + "sortText": { + "type": "string", + "description": "A string that should be used when comparing this item with other items. When `falsy` the label is used." + }, + "type": { + "$ref": "#/definitions/CompletionItemType", + "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon." + }, + "start": { + "type": "integer", + "description": "This value determines the location (in the CompletionsRequest's 'text' attribute) where the completion text is added.\nIf missing the text is added at the location specified by the CompletionsRequest's 'column' attribute." + }, + "length": { + "type": "integer", + "description": "This value determines how many characters are overwritten by the completion text.\nIf missing the value 0 is assumed which results in the completion text being inserted." + }, + "selectionStart": { + "type": "integer", + "description": "Determines the start of the new selection after the text has been inserted (or replaced).\nThe start position must in the range 0 and length of the completion text.\nIf omitted the selection starts at the end of the completion text." + }, + "selectionLength": { + "type": "integer", + "description": "Determines the length of the new selection after the text has been inserted (or replaced).\nThe selection can not extend beyond the bounds of the completion text.\nIf omitted the length is assumed to be 0." + } + }, + "required": [ "label" ] + }, + + "CompletionItemType": { + "type": "string", + "description": "Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.", + "enum": [ "method", "function", "constructor", "field", "variable", "class", "interface", "module", "property", "unit", "value", "enum", "keyword", "snippet", "text", "color", "file", "reference", "customcolor" ] + }, + + "ChecksumAlgorithm": { + "type": "string", + "description": "Names of checksum algorithms that may be supported by a debug adapter.", + "enum": [ "MD5", "SHA1", "SHA256", "timestamp" ] + }, + + "Checksum": { + "type": "object", + "description": "The checksum of an item calculated by the specified algorithm.", + "properties": { + "algorithm": { + "$ref": "#/definitions/ChecksumAlgorithm", + "description": "The algorithm used to calculate this checksum." + }, + "checksum": { + "type": "string", + "description": "Value of the checksum." + } + }, + "required": [ "algorithm", "checksum" ] + }, + + "ValueFormat": { + "type": "object", + "description": "Provides formatting information for a value.", + "properties": { + "hex": { + "type": "boolean", + "description": "Display the value in hex." + } + } + }, + + "StackFrameFormat": { + "allOf": [ { "$ref": "#/definitions/ValueFormat" }, { + "type": "object", + "description": "Provides formatting information for a stack frame.", + "properties": { + "parameters": { + "type": "boolean", + "description": "Displays parameters for the stack frame." + }, + "parameterTypes": { + "type": "boolean", + "description": "Displays the types of parameters for the stack frame." + }, + "parameterNames": { + "type": "boolean", + "description": "Displays the names of parameters for the stack frame." + }, + "parameterValues": { + "type": "boolean", + "description": "Displays the values of parameters for the stack frame." + }, + "line": { + "type": "boolean", + "description": "Displays the line number of the stack frame." + }, + "module": { + "type": "boolean", + "description": "Displays the module of the stack frame." + }, + "includeAll": { + "type": "boolean", + "description": "Includes all stack frames, including those the debug adapter might otherwise hide." + } + } + }] + }, + + "ExceptionFilterOptions": { + "type": "object", + "description": "An ExceptionFilterOptions is used to specify an exception filter together with a condition for the setExceptionsFilter request.", + "properties": { + "filterId": { + "type": "string", + "description": "ID of an exception filter returned by the 'exceptionBreakpointFilters' capability." + }, + "condition": { + "type": "string", + "description": "An optional expression for conditional exceptions.\nThe exception will break into the debugger if the result of the condition is true." + } + }, + "required": [ "filterId" ] + }, + + "ExceptionOptions": { + "type": "object", + "description": "An ExceptionOptions assigns configuration options to a set of exceptions.", + "properties": { + "path": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionPathSegment" + }, + "description": "A path that selects a single or multiple exceptions in a tree. If 'path' is missing, the whole tree is selected.\nBy convention the first segment of the path is a category that is used to group exceptions in the UI." + }, + "breakMode": { + "$ref": "#/definitions/ExceptionBreakMode", + "description": "Condition when a thrown exception should result in a break." + } + }, + "required": [ "breakMode" ] + }, + + "ExceptionBreakMode": { + "type": "string", + "description": "This enumeration defines all possible conditions when a thrown exception should result in a break.\nnever: never breaks,\nalways: always breaks,\nunhandled: breaks when exception unhandled,\nuserUnhandled: breaks if the exception is not handled by user code.", + "enum": [ "never", "always", "unhandled", "userUnhandled" ] + }, + + "ExceptionPathSegment": { + "type": "object", + "description": "An ExceptionPathSegment represents a segment in a path that is used to match leaves or nodes in a tree of exceptions.\nIf a segment consists of more than one name, it matches the names provided if 'negate' is false or missing or\nit matches anything except the names provided if 'negate' is true.", + "properties": { + "negate": { + "type": "boolean", + "description": "If false or missing this segment matches the names provided, otherwise it matches anything except the names provided." + }, + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Depending on the value of 'negate' the names that should match or not match." + } + }, + "required": [ "names" ] + }, + + "ExceptionDetails": { + "type": "object", + "description": "Detailed information about an exception that has occurred.", + "properties": { + "message": { + "type": "string", + "description": "Message contained in the exception." + }, + "typeName": { + "type": "string", + "description": "Short type name of the exception object." + }, + "fullTypeName": { + "type": "string", + "description": "Fully-qualified type name of the exception object." + }, + "evaluateName": { + "type": "string", + "description": "Optional expression that can be evaluated in the current scope to obtain the exception object." + }, + "stackTrace": { + "type": "string", + "description": "Stack trace at the time the exception was thrown." + }, + "innerException": { + "type": "array", + "items": { + "$ref": "#/definitions/ExceptionDetails" + }, + "description": "Details of the exception contained by this exception, if any." + } + } + }, + + "DisassembledInstruction": { + "type": "object", + "description": "Represents a single disassembled instruction.", + "properties": { + "address": { + "type": "string", + "description": "The address of the instruction. Treated as a hex value if prefixed with '0x', or as a decimal value otherwise." + }, + "instructionBytes": { + "type": "string", + "description": "Optional raw bytes representing the instruction and its operands, in an implementation-defined format." + }, + "instruction": { + "type": "string", + "description": "Text representing the instruction and its operands, in an implementation-defined format." + }, + "symbol": { + "type": "string", + "description": "Name of the symbol that corresponds with the location of this instruction, if any." + }, + "location": { + "$ref": "#/definitions/Source", + "description": "Source location that corresponds to this instruction, if any.\nShould always be set (if available) on the first instruction returned,\nbut can be omitted afterwards if this instruction maps to the same source file as the previous instruction." + }, + "line": { + "type": "integer", + "description": "The line within the source location that corresponds to this instruction, if any." + }, + "column": { + "type": "integer", + "description": "The column within the line that corresponds to this instruction, if any." + }, + "endLine": { + "type": "integer", + "description": "The end line of the range that corresponds to this instruction, if any." + }, + "endColumn": { + "type": "integer", + "description": "The end column of the range that corresponds to this instruction, if any." + } + }, + "required": [ "address", "instruction" ] + }, + + "InvalidatedAreas": { + "type": "string", + "description": "Logical areas that can be invalidated by the 'invalidated' event.", + "_enum": [ "all", "stacks", "threads", "variables" ], + "enumDescriptions": [ + "All previously fetched data has become invalid and needs to be refetched.", + "Previously fetched stack related data has become invalid and needs to be refetched.", + "Previously fetched thread related data has become invalid and needs to be refetched.", + "Previously fetched variable data has become invalid and needs to be refetched." + ] + } + + } } From 4648b49a9e8d737c5d4bae44147c566ac99e17c1 Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Fri, 15 Nov 2024 15:02:14 +0700 Subject: [PATCH 08/11] Fix new compilation errors from master merge --- .../src/v1/da_source_service/service.rs | 4 +- .../gas_price_service/src/v1/service.rs | 69 +++++++++++++------ crates/services/src/service.rs | 8 +++ 3 files changed, 58 insertions(+), 23 deletions(-) diff --git a/crates/services/gas_price_service/src/v1/da_source_service/service.rs b/crates/services/gas_price_service/src/v1/da_source_service/service.rs index 416ddeab2b0..92484591154 100644 --- a/crates/services/gas_price_service/src/v1/da_source_service/service.rs +++ b/crates/services/gas_price_service/src/v1/da_source_service/service.rs @@ -16,7 +16,6 @@ use tokio::{ use crate::v1::da_source_service::DaBlockCosts; pub use anyhow::Result; -use fuel_core_services::stream::BoxFuture; #[derive(Clone)] pub struct SharedState(Sender); @@ -109,7 +108,8 @@ where TaskRunResult::Stop } _ = self.poll_interval.tick() => { - match self.source.request_da_block_cost().await.and_then(|da_block_costs| self.shared_state.0.send(da_block_costs).map_err(|err| anyhow::anyhow!(err))) { + let da_block_costs_res = self.source.request_da_block_cost().await.and_then(|da_block_costs| self.shared_state.0.send(da_block_costs).map_err(|err| anyhow::anyhow!(err))); + match da_block_costs_res { Ok(da_block_costs) => { TaskRunResult::Continue } diff --git a/crates/services/gas_price_service/src/v1/service.rs b/crates/services/gas_price_service/src/v1/service.rs index 5ab56160334..7f9afa0f247 100644 --- a/crates/services/gas_price_service/src/v1/service.rs +++ b/crates/services/gas_price_service/src/v1/service.rs @@ -30,6 +30,7 @@ use fuel_core_services::{ RunnableService, RunnableTask, StateWatcher, + TaskRunResult, }; use fuel_gas_price_algorithm::{ v0::AlgorithmUpdaterV0, @@ -40,7 +41,12 @@ use fuel_gas_price_algorithm::{ }; use futures::FutureExt; use std::num::NonZeroU64; -use tokio::sync::broadcast::Receiver; +use tokio::sync::broadcast::{ + error::RecvError, + Receiver, +}; + +use crate::common::utils::Result as GasPriceResult; /// The service that updates the gas price algorithm. pub struct GasPriceServiceV1 @@ -61,6 +67,38 @@ where da_source_channel: Receiver, } +impl GasPriceServiceV1 +where + L2: L2BlockSource, + Metadata: MetadataStorage, + DA: DaBlockCostsSource, +{ + async fn process_l2_block_res( + &mut self, + l2_block_res: GasPriceResult, + ) -> anyhow::Result<()> { + tracing::info!("Received L2 block result: {:?}", l2_block_res); + let block = l2_block_res?; + + tracing::debug!("Updating gas price algorithm"); + self.apply_block_info_to_gas_algorithm(block).await?; + Ok(()) + } + + async fn process_da_block_costs_res( + &mut self, + da_block_costs: Result, + ) -> anyhow::Result<()> { + tracing::info!("Received DA block costs: {:?}", da_block_costs); + let da_block_costs = da_block_costs?; + + tracing::debug!("Updating DA block costs"); + self.apply_da_block_costs_to_gas_algorithm(da_block_costs) + .await?; + Ok(()) + } +} + impl GasPriceServiceV1 where Metadata: MetadataStorage, @@ -194,32 +232,22 @@ where Metadata: MetadataStorage, DA: DaBlockCostsSource, { - async fn run(&mut self, watcher: &mut StateWatcher) -> anyhow::Result { - let should_continue; + async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { tokio::select! { biased; _ = watcher.while_started() => { tracing::debug!("Stopping gas price service"); - should_continue = false; + TaskRunResult::Stop } l2_block_res = self.l2_block_source.get_l2_block() => { - tracing::info!("Received L2 block result: {:?}", l2_block_res); - let block = l2_block_res?; - - tracing::debug!("Updating gas price algorithm"); - self.apply_block_info_to_gas_algorithm(block).await?; - should_continue = true; + let res = self.process_l2_block_res(l2_block_res).await; + TaskRunResult::continue_if_ok(res) } da_block_costs = self.da_source_channel.recv() => { - tracing::info!("Received DA block costs: {:?}", da_block_costs); - let da_block_costs = da_block_costs?; - - tracing::debug!("Updating DA block costs"); - self.apply_da_block_costs_to_gas_algorithm(da_block_costs).await?; - should_continue = true; + let res = self.process_da_block_costs_res(da_block_costs).await; + TaskRunResult::Continue } } - Ok(should_continue) } async fn shutdown(mut self) -> anyhow::Result<()> { @@ -424,7 +452,7 @@ mod tests { let initial_price = read_algo.next_gas_price(); // when - service.run(&mut watcher).await.unwrap(); + service.run(&mut watcher).await; l2_block_sender.send(l2_block).await.unwrap(); service.shutdown().await.unwrap(); @@ -501,11 +529,10 @@ mod tests { service .da_source_adapter_handle .run(&mut da_source_watcher) - .await - .unwrap(); + .await; // when - service.run(&mut watcher).await.unwrap(); + service.run(&mut watcher).await; tokio::time::sleep(Duration::from_millis(100)).await; service.shutdown().await.unwrap(); diff --git a/crates/services/src/service.rs b/crates/services/src/service.rs index f254b9a4b9b..40f316679d6 100644 --- a/crates/services/src/service.rs +++ b/crates/services/src/service.rs @@ -102,6 +102,14 @@ impl TaskRunResult { TaskRunResult::Stop } } + + /// Creates a `TaskRunResult` from a `Result` where `Ok` means `Continue` and any error is reported + pub fn continue_if_ok>(res: Result) -> TaskRunResult { + match res { + Ok(_) => TaskRunResult::Continue, + Err(e) => TaskRunResult::ErrorContinue(e.into()), + } + } } impl From> for TaskRunResult { From 78c29409ba9559f051c556a0f89e017b6f3c5393 Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Fri, 15 Nov 2024 15:07:26 +0700 Subject: [PATCH 09/11] Add helper to v0 code --- .../gas_price_service/src/v0/service.rs | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/crates/services/gas_price_service/src/v0/service.rs b/crates/services/gas_price_service/src/v0/service.rs index 76297c4bea4..66c14645558 100644 --- a/crates/services/gas_price_service/src/v0/service.rs +++ b/crates/services/gas_price_service/src/v0/service.rs @@ -117,6 +117,23 @@ where } } +impl GasPriceServiceV0 +where + L2: L2BlockSource, + Metadata: MetadataStorage, +{ + async fn process_l2_block_res( + &mut self, + l2_block_res: crate::common::utils::Result, + ) -> anyhow::Result<()> { + tracing::info!("Received L2 block result: {:?}", l2_block_res); + let block = l2_block_res?; + + tracing::debug!("Updating gas price algorithm"); + self.apply_block_info_to_gas_algorithm(block).await?; + Ok(()) + } +} #[async_trait] impl RunnableTask for GasPriceServiceV0 where @@ -131,22 +148,8 @@ where TaskRunResult::Stop } l2_block_res = self.l2_block_source.get_l2_block() => { - tracing::info!("Received L2 block result: {:?}", l2_block_res); - let block = match l2_block_res { - Ok(block) => block, - Err(err) => { - return anyhow!(err).into() - } - }; - - tracing::debug!("Updating gas price algorithm"); - match self.apply_block_info_to_gas_algorithm(block).await { - Ok(_) => {}, - Err(err) => { - return err.into() - } - } - TaskRunResult::Continue + let res = self.process_l2_block_res(l2_block_res).await; + TaskRunResult::continue_if_ok(res) } } } From 81c9d22d23bde577bdc1b64706c4108ea63e67d4 Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Fri, 15 Nov 2024 15:14:28 +0700 Subject: [PATCH 10/11] Cleanup noisy code --- .../src/v1/da_source_service/service.rs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/crates/services/gas_price_service/src/v1/da_source_service/service.rs b/crates/services/gas_price_service/src/v1/da_source_service/service.rs index 92484591154..e4abab75f99 100644 --- a/crates/services/gas_price_service/src/v1/da_source_service/service.rs +++ b/crates/services/gas_price_service/src/v1/da_source_service/service.rs @@ -58,6 +58,12 @@ where source, } } + + async fn process_block_costs(&mut self) -> Result<()> { + let da_block_costs = self.source.request_da_block_cost().await?; + self.shared_state.0.send(da_block_costs)?; + Ok(()) + } } /// This trait is implemented by the sources to obtain the @@ -108,15 +114,8 @@ where TaskRunResult::Stop } _ = self.poll_interval.tick() => { - let da_block_costs_res = self.source.request_da_block_cost().await.and_then(|da_block_costs| self.shared_state.0.send(da_block_costs).map_err(|err| anyhow::anyhow!(err))); - match da_block_costs_res { - Ok(da_block_costs) => { - TaskRunResult::Continue - } - Err(err) => { - TaskRunResult::ErrorContinue(err) - } - } + let da_block_costs_res = self.process_block_costs().await; + TaskRunResult::continue_if_ok(da_block_costs_res) } } } From 8495bc9dafe63e55c89b5cb3d90cd3d5f6266fad Mon Sep 17 00:00:00 2001 From: Mitch Turner Date: Fri, 15 Nov 2024 15:32:23 +0700 Subject: [PATCH 11/11] Remove `should_continue` method --- .../src/graphql_api/worker_service.rs | 14 +++++---- .../adapters/consensus_parameters_provider.rs | 7 ++--- .../consensus_module/poa/src/service.rs | 23 +++++--------- .../services/consensus_module/poa/src/sync.rs | 9 +++--- crates/services/p2p/src/service.rs | 30 ++++++++----------- crates/services/src/service.rs | 17 +++++------ crates/services/sync/src/service.rs | 6 ++-- 7 files changed, 45 insertions(+), 61 deletions(-) diff --git a/crates/fuel-core/src/graphql_api/worker_service.rs b/crates/fuel-core/src/graphql_api/worker_service.rs index c2744473fcc..ca429ef53fa 100644 --- a/crates/fuel-core/src/graphql_api/worker_service.rs +++ b/crates/fuel-core/src/graphql_api/worker_service.rs @@ -553,12 +553,11 @@ where D: ports::worker::OffChainDatabase, { async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { - let should_continue; tokio::select! { biased; _ = watcher.while_started() => { - should_continue = false; + TaskRunResult::Stop } result = self.block_importer.next() => { @@ -569,16 +568,19 @@ where // de-synchronization between on-chain and off-chain databases. if let Err(e) = result { tracing::error!("Error processing block: {:?}", e); - should_continue = self.continue_on_error; + if self.continue_on_error { + TaskRunResult::Continue + } else { + TaskRunResult::Stop + } } else { - should_continue = true + TaskRunResult::Continue } } else { - should_continue = false + TaskRunResult::Stop } } } - TaskRunResult::should_continue(should_continue) } async fn shutdown(mut self) -> anyhow::Result<()> { diff --git a/crates/fuel-core/src/service/adapters/consensus_parameters_provider.rs b/crates/fuel-core/src/service/adapters/consensus_parameters_provider.rs index ec7f7fa278c..d31ba710569 100644 --- a/crates/fuel-core/src/service/adapters/consensus_parameters_provider.rs +++ b/crates/fuel-core/src/service/adapters/consensus_parameters_provider.rs @@ -113,12 +113,11 @@ impl SharedState { #[async_trait::async_trait] impl RunnableTask for Task { async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { - let should_continue; tokio::select! { biased; _ = watcher.while_started() => { - should_continue = false; + TaskRunResult::Stop } Some(event) = self.blocks_events.next() => { @@ -140,11 +139,9 @@ impl RunnableTask for Task { } } } - should_continue = true; + TaskRunResult::Continue } } - - TaskRunResult::should_continue(should_continue) } async fn shutdown(self) -> anyhow::Result<()> { diff --git a/crates/services/consensus_module/poa/src/service.rs b/crates/services/consensus_module/poa/src/service.rs index bc5c0d1c761..b296ecda82b 100644 --- a/crates/services/consensus_module/poa/src/service.rs +++ b/crates/services/consensus_module/poa/src/service.rs @@ -520,7 +520,6 @@ where C: GetTime, { async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { - let should_continue; let mut sync_state = self.sync_task_handle.shared.clone(); // make sure we're synced first if *sync_state.borrow_and_update() == SyncState::NotSynced { @@ -568,7 +567,7 @@ where tokio::select! { biased; _ = watcher.while_started() => { - should_continue = false; + TaskRunResult::Stop } request = self.request_receiver.recv() => { if let Some(request) = request { @@ -578,33 +577,27 @@ where let _ = response.send(result); } } - should_continue = true; + TaskRunResult::Continue } else { tracing::error!("The PoA task should be the holder of the `Sender`"); - should_continue = false; + TaskRunResult::Stop } } _ = next_block_production => { match self.on_timer().await.context("While processing timer event") { - Ok(()) => should_continue = true, + Ok(()) => TaskRunResult::Continue, Err(err) => { // Wait some time in case of error to avoid spamming retry block production tokio::time::sleep(Duration::from_secs(1)).await; - return TaskRunResult::ErrorContinue(err); + err.into() } - }; + } } _ = self.new_txs_watcher.changed() => { - match self.on_txpool_event().await.context("While processing txpool event") { - Ok(()) => should_continue = true, - Err(err) => { - return TaskRunResult::ErrorContinue(err); - } - }; + let res = self.on_txpool_event().await.context("While processing txpool event"); + TaskRunResult::continue_if_ok(res) } } - - TaskRunResult::should_continue(should_continue) } async fn shutdown(self) -> anyhow::Result<()> { diff --git a/crates/services/consensus_module/poa/src/sync.rs b/crates/services/consensus_module/poa/src/sync.rs index 62f155b5eff..f2b2e0bc62c 100644 --- a/crates/services/consensus_module/poa/src/sync.rs +++ b/crates/services/consensus_module/poa/src/sync.rs @@ -139,8 +139,6 @@ impl RunnableService for SyncTask { #[async_trait::async_trait] impl RunnableTask for SyncTask { async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { - let mut should_continue = true; - let tick: BoxFuture = if let Some(timer) = &mut self.timer { Box::pin(timer.tick()) } else { @@ -150,7 +148,7 @@ impl RunnableTask for SyncTask { tokio::select! { biased; _ = watcher.while_started() => { - should_continue = false; + TaskRunResult::Stop } Some(latest_peer_count) = self.peer_connections_stream.next() => { let sufficient_peers = latest_peer_count >= self.min_connected_reserved_peers; @@ -172,6 +170,7 @@ impl RunnableTask for SyncTask { } _ => {}, } + TaskRunResult::Continue } Some(block_info) = self.block_stream.next() => { let new_block_height = block_info.block_header.height(); @@ -205,6 +204,7 @@ impl RunnableTask for SyncTask { } _ => {} } + TaskRunResult::Continue } _ = tick => { if let InnerSyncState::SufficientPeers(block_header) = &self.inner_state { @@ -215,10 +215,9 @@ impl RunnableTask for SyncTask { }; self.update_sync_state(SyncState::Synced(Arc::new(block_header))); } + TaskRunResult::Continue } } - - TaskRunResult::should_continue(should_continue) } async fn shutdown(self) -> anyhow::Result<()> { diff --git a/crates/services/p2p/src/service.rs b/crates/services/p2p/src/service.rs index a5d157e0512..e21912d2a80 100644 --- a/crates/services/p2p/src/service.rs +++ b/crates/services/p2p/src/service.rs @@ -851,24 +851,22 @@ where { async fn run(&mut self, watcher: &mut StateWatcher) -> TaskRunResult { tracing::debug!("P2P task is running"); - let mut should_continue; tokio::select! { biased; _ = watcher.while_started() => { - should_continue = false; + TaskRunResult::Stop }, latest_block_height = self.next_block_height.next() => { if let Some(latest_block_height) = latest_block_height { let _ = self.p2p_service.update_block_height(latest_block_height); - should_continue = true; + TaskRunResult::Continue } else { - should_continue = false; + TaskRunResult::Stop } }, next_service_request = self.request_receiver.recv() => { - should_continue = true; match next_service_request { Some(TaskRequest::BroadcastTransaction(transaction)) => { let tx_id = transaction.id(&self.chain_id); @@ -884,7 +882,7 @@ where let height = BlockHeight::from(block_height_range.end.saturating_sub(1)); let Some(peer) = self.p2p_service.get_peer_id_with_height(&height) else { let _ = channel.send(Err(TaskError::NoPeerFound)); - return TaskRunResult::should_continue(should_continue) + return TaskRunResult::Continue }; let channel = ResponseSender::SealedHeaders(channel); let request_msg = RequestMessage::SealedHeaders(block_height_range.clone()); @@ -894,7 +892,7 @@ where let height = BlockHeight::from(block_height_range.end.saturating_sub(1)); let Some(peer) = self.p2p_service.get_peer_id_with_height(&height) else { let _ = channel.send(Err(TaskError::NoPeerFound)); - return TaskRunResult::should_continue(should_continue) + return TaskRunResult::Continue }; let channel = ResponseSender::Transactions(channel); let request_msg = RequestMessage::Transactions(block_height_range.clone()); @@ -948,12 +946,12 @@ where } None => { tracing::error!("The P2P `Task` should be holder of the `Sender`"); - should_continue = false; + return TaskRunResult::Stop } } + TaskRunResult::Continue } p2p_event = self.p2p_service.next_event() => { - should_continue = true; match p2p_event { Some(FuelP2PEvent::PeerInfoUpdated { peer_id, block_height }) => { let peer_id: Vec = peer_id.into(); @@ -975,11 +973,9 @@ where } }, Some(FuelP2PEvent::InboundRequestMessage { request_message, request_id }) => { - match self.process_request(request_message, request_id) { - Ok(_) => {}, - Err(err) => { - return err.into() - } + let res = self.process_request(request_message, request_id); + if let Err(err) = res { + return err.into() } }, Some(FuelP2PEvent::NewSubscription { peer_id, tag }) => { @@ -989,9 +985,9 @@ where }, _ => (), } + TaskRunResult::Continue }, _ = tokio::time::sleep_until(self.next_check_time) => { - should_continue = true; let res = self.peer_heartbeat_reputation_checks(); match res { Ok(_) => tracing::debug!("Peer heartbeat reputation checks completed"), @@ -1000,11 +996,9 @@ where } } self.next_check_time += self.heartbeat_check_interval; + TaskRunResult::Continue } } - - tracing::debug!("P2P task is finished"); - TaskRunResult::should_continue(should_continue) } async fn shutdown(self) -> anyhow::Result<()> { diff --git a/crates/services/src/service.rs b/crates/services/src/service.rs index 40f316679d6..3c04b31cfde 100644 --- a/crates/services/src/service.rs +++ b/crates/services/src/service.rs @@ -94,15 +94,6 @@ pub enum TaskRunResult { } impl TaskRunResult { - /// Creates a `TaskRunResult` from a boolean value where `true` means `Continue` and `false` means `Stop` - pub fn should_continue(should_continue: bool) -> Self { - if should_continue { - TaskRunResult::Continue - } else { - TaskRunResult::Stop - } - } - /// Creates a `TaskRunResult` from a `Result` where `Ok` means `Continue` and any error is reported pub fn continue_if_ok>(res: Result) -> TaskRunResult { match res { @@ -115,7 +106,13 @@ impl TaskRunResult { impl From> for TaskRunResult { fn from(result: Result) -> Self { match result { - Ok(should_continue) => TaskRunResult::should_continue(should_continue), + Ok(should_continue) => { + if should_continue { + TaskRunResult::Continue + } else { + TaskRunResult::Stop + } + } Err(e) => TaskRunResult::ErrorContinue(e), } } diff --git a/crates/services/sync/src/service.rs b/crates/services/sync/src/service.rs index 0f68b6203ab..6a75546e897 100644 --- a/crates/services/sync/src/service.rs +++ b/crates/services/sync/src/service.rs @@ -120,8 +120,10 @@ where C: ConsensusPort + Send + Sync + 'static, { async fn run(&mut self, _: &mut StateWatcher) -> TaskRunResult { - let should_continue = self.sync_heights.sync().await.is_some(); - TaskRunResult::should_continue(should_continue) + match self.sync_heights.sync().await { + None => TaskRunResult::Stop, + Some(_) => TaskRunResult::Continue, + } } async fn shutdown(self) -> anyhow::Result<()> {