From 1dca8ac5fec879336b533e89f7ee9787a35fd03b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Sp=C3=B6ttel?=
<1682504+fspoettel@users.noreply.github.com>
Date: Sat, 29 Oct 2022 17:06:37 +0200
Subject: [PATCH] docs: add vs code debugger to optional features
---
README.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/README.md b/README.md
index 9489f83..fdbc1f8 100644
--- a/README.md
+++ b/README.md
@@ -175,6 +175,15 @@ Go to the _Secrets_ tab in your repository settings and create the following sec
> **Note**
> The session cookie might expire after a while (~1 month) which causes the automated workflow to fail. To fix this issue, refresh the `AOC_SESSION` secret.
+### Using VS Code to debug your code
+
+ 1. Install [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) and [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb).
+ 2. Set breakpoints in your code. [^1]
+ 3. Click _Debug_ next to the unit test or the _main_ function. [^2]
+ 4. The debugger will halt your program at the specific line and allow you to inspect the local stack. [^3]
+
+---
+
## Useful crates
- [itertools](https://crates.io/crates/itertools): Extends iterators with extra methods and adaptors. Frequently useful for aoc puzzles.
@@ -186,3 +195,9 @@ Do you have aoc-specific crate recommendations? [Share them!](https://github.com
## Common pitfalls
* **Integer overflows:** This template uses 32-bit integers by default because it is generally faster - for example when packed in large arrays or structs - than using 64-bit integers everywhere. For some problems, solutions for real input might exceed 32-bit integer space. While this is checked and panics in `debug` mode, integers [wrap](https://doc.rust-lang.org/book/ch03-02-data-types.html#integer-overflow) in `release` mode, leading to wrong output when running your solution.
+
+## Footnotes
+
+[^1]:
+[^2]:
+[^3]: