A small tool to view real-world ActivityPub objects as JSON! Enter a URL
or username from Mastodon or a similar service below, and we'll send a
request with
the right
Accept
header
to the server to view the underlying object.
{
"@context": [
"https://join-lemmy.org/context.json",
"https://www.w3.org/ns/activitystreams"
],
"type": "Page",
"id": "https://lemmy.world/post/20581829",
"attributedTo": "https://lemmy.world/u/trymeout",
"to": [
"https://programming.dev/c/rust",
"https://www.w3.org/ns/activitystreams#Public"
],
"name": "Getting debugger setup in VSCode",
"cc": [],
"content": "<p>Just started learning Rust today and got Rust installed, got the hello world example compiled and running. I installed <code>rust-analyzer</code> and <code>CodeLLDB</code> extensions in VSCode. Enable the <code>debug.allowBreakpointsEverywhere</code> settings to VSCode to be true. Setup a debug configuration in VSCode.</p>\n<p>However I keep getting errors from <code>rust-analyzer</code> when I run the debugger…</p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">2024-10-06T22:16:04.808655Z ERROR FetchWorkspaceError: rust-analyzer failed to load workspace: Failed to load the project at /home/john/Documents/Snippets/Rust/Cargo.toml: Failed to read Cargo metadata from Cargo.toml file /home/john/Documents/Snippets/Rust/Cargo.toml, Some(Version { major: 1, minor: 81, patch: 0 }): Failed to run `cd "/home/john/Documents/Snippets/Rust" && RUSTUP_TOOLCHAIN="/home/john/.rustup/toolchains/stable-x86_64-unknown-linux-gnu" "/home/john/.cargo/bin/cargo" "metadata" "--format-version" "1" "--manifest-path" "/home/john/Documents/Snippets/Rust/Cargo.toml" "--filter-platform" "x86_64-unknown-linux-gnu"`: `cargo metadata` exited with an error: error: failed to parse manifest at `/home/john/Documents/Snippets/Rust/Cargo.toml`\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">Caused by:\n</span><span style=\"color:#323232;\"> no targets specified in the manifest\n</span><span style=\"color:#323232;\"> either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present\n</span></pre>\n<p>I not sure how to fix this.</p>\n<p>I would like to get the VSCode debugger to work for launch debugging, attach debugging and launch and attach debugging for rust running inside a docker container. This will be a good setup for getting started I believe.</p>\n<p>This is my VSCode debugger configuration…</p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">{\n</span><span style=\"color:#323232;\">\t// Use IntelliSense to learn about possible attributes.\n</span><span style=\"color:#323232;\">\t// Hover to view descriptions of existing attributes.\n</span><span style=\"color:#323232;\">\t// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n</span><span style=\"color:#323232;\">\t"version": "0.2.0",\n</span><span style=\"color:#323232;\">\t"configurations": [\n</span><span style=\"color:#323232;\">\t\t{\n</span><span style=\"color:#323232;\">\t\t\t"type": "lldb",\n</span><span style=\"color:#323232;\">\t\t\t"request": "launch",\n</span><span style=\"color:#323232;\">\t\t\t"name": "Debug",\n</span><span style=\"color:#323232;\">\t\t\t"program": "${workspaceFolder}/hello-world",\n</span><span style=\"color:#323232;\">\t\t\t"args": [],\n</span><span style=\"color:#323232;\">\t\t\t"cwd": "${workspaceFolder}"\n</span><span style=\"color:#323232;\">\t\t}\n</span><span style=\"color:#323232;\">\t]\n</span><span style=\"color:#323232;\">}\n</span><span style=\"color:#323232;\">\n</span></pre>\n<p>Any help and advice will be most appreciated.</p>\n",
"mediaType": "text/html",
"source": {
"content": "Just started learning Rust today and got Rust installed, got the hello world example compiled and running. I installed `rust-analyzer` and `CodeLLDB` extensions in VSCode. Enable the `debug.allowBreakpointsEverywhere` settings to VSCode to be true. Setup a debug configuration in VSCode.\n\nHowever I keep getting errors from `rust-analyzer` when I run the debugger...\n\n```\n2024-10-06T22:16:04.808655Z ERROR FetchWorkspaceError: rust-analyzer failed to load workspace: Failed to load the project at /home/john/Documents/Snippets/Rust/Cargo.toml: Failed to read Cargo metadata from Cargo.toml file /home/john/Documents/Snippets/Rust/Cargo.toml, Some(Version { major: 1, minor: 81, patch: 0 }): Failed to run `cd \"/home/john/Documents/Snippets/Rust\" && RUSTUP_TOOLCHAIN=\"/home/john/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\" \"/home/john/.cargo/bin/cargo\" \"metadata\" \"--format-version\" \"1\" \"--manifest-path\" \"/home/john/Documents/Snippets/Rust/Cargo.toml\" \"--filter-platform\" \"x86_64-unknown-linux-gnu\"`: `cargo metadata` exited with an error: error: failed to parse manifest at `/home/john/Documents/Snippets/Rust/Cargo.toml`\n\nCaused by:\n no targets specified in the manifest\n either src/lib.rs, src/main.rs, a [lib] section, or [[bin]] section must be present\n```\n\nI not sure how to fix this.\n\nI would like to get the VSCode debugger to work for launch debugging, attach debugging and launch and attach debugging for rust running inside a docker container. This will be a good setup for getting started I believe.\n\nThis is my VSCode debugger configuration...\n\n```\n{\n\t// Use IntelliSense to learn about possible attributes.\n\t// Hover to view descriptions of existing attributes.\n\t// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387\n\t\"version\": \"0.2.0\",\n\t\"configurations\": [\n\t\t{\n\t\t\t\"type\": \"lldb\",\n\t\t\t\"request\": \"launch\",\n\t\t\t\"name\": \"Debug\",\n\t\t\t\"program\": \"${workspaceFolder}/hello-world\",\n\t\t\t\"args\": [],\n\t\t\t\"cwd\": \"${workspaceFolder}\"\n\t\t}\n\t]\n}\n\n```\n\nAny help and advice will be most appreciated.",
"mediaType": "text/markdown"
},
"attachment": [],
"commentsEnabled": true,
"sensitive": false,
"published": "2024-10-07T00:48:29.264453Z",
"language": {
"identifier": "en",
"name": "English"
},
"audience": "https://programming.dev/c/rust"
}