Skip to content

Instantly share code, notes, and snippets.

View sgwealti's full-sized avatar

Shane Wealti sgwealti

  • Geodis
  • Columbus, Ohio
View GitHub Profile
@Tomboyo
Tomboyo / vscode_elixir_debugger_instructions.md
Last active June 24, 2024 18:28
Interactive Elixir Debugging with VSCode and ElixirLS

In this Gist we will configure VSCode for Elixir debugging. Once done, we will be able to debug any function with any arguments by opening the VSCode Run (a.k.a Debug) view, selecting the "mix run" debug configuration, and entering any invocation such as Example.run(:my_args) into a command palette prompt. This will let us step through the code as it executes and use breakpoints like normal.

This Gist expects you have the ElixirLS: Elixir Support and Debugger extension installed. This Gist is based on version 0.6.2.

1. Create a launch configuration

Create a .vscode/launch.json file at the root of your project if one does not exist already. Modify the file to contain inputs and configurations like the following:

{
@PJUllrich
PJUllrich / big-o.md
Last active June 28, 2024 20:25
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for <= 32 elements, O(log n) for > 32 elements [2]
Deletion O(n) for <= 32 elements, O(log n) for > 32 elements