mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #13204 - ejpbruel:debugger, r=jdm
Implement a WebSocket server for debugging. <!-- Please describe your changes on the following line: --> This pull request adds a very simple WebSocket server to Servo, that we intend to use for debugging. It currently only echoes back messages, but eventually we want this server to implement the Chrome Debugging Protocol. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because this is a prototype. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13204) <!-- Reviewable:end -->
This commit is contained in:
commit
f834c893c7
7 changed files with 100 additions and 0 deletions
9
components/servo/Cargo.lock
generated
9
components/servo/Cargo.lock
generated
|
@ -10,6 +10,7 @@ dependencies = [
|
|||
"compiletest_helper 0.0.1",
|
||||
"compositing 0.0.1",
|
||||
"constellation 0.0.1",
|
||||
"debugger 0.0.1",
|
||||
"devtools 0.0.1",
|
||||
"devtools_traits 0.0.1",
|
||||
"env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -481,6 +482,14 @@ dependencies = [
|
|||
"unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "debugger"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"util 0.0.1",
|
||||
"websocket 0.17.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deque"
|
||||
version = "0.3.1"
|
||||
|
|
|
@ -49,6 +49,7 @@ canvas = {path = "../canvas"}
|
|||
canvas_traits = {path = "../canvas_traits"}
|
||||
compositing = {path = "../compositing"}
|
||||
constellation = {path = "../constellation"}
|
||||
debugger = {path = "../debugger"}
|
||||
devtools = {path = "../devtools"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
env_logger = "0.3"
|
||||
|
|
|
@ -28,6 +28,7 @@ pub extern crate canvas;
|
|||
pub extern crate canvas_traits;
|
||||
pub extern crate compositing;
|
||||
pub extern crate constellation;
|
||||
pub extern crate debugger;
|
||||
pub extern crate devtools;
|
||||
pub extern crate devtools_traits;
|
||||
pub extern crate euclid;
|
||||
|
@ -125,6 +126,9 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
|
|||
let time_profiler_chan = profile_time::Profiler::create(&opts.time_profiling,
|
||||
opts.time_profiler_trace_path.clone());
|
||||
let mem_profiler_chan = profile_mem::Profiler::create(opts.mem_profiler_period);
|
||||
if let Some(port) = opts.debugger_port {
|
||||
debugger::start_server(port)
|
||||
}
|
||||
let devtools_chan = opts.devtools_port.map(|port| {
|
||||
devtools::start_server(port)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue