Back to the Blog

Technical article

AutoLISP debugging error 0xC0000005 in VS Code: how to reset workspaceStorage

A reversible procedure for recovering AutoLISP debugging when VS Code persists problematic workspace state.

Editorial owner: CadSyntra

If an AutoLISP routine that previously worked can no longer be debugged from VS Code and AutoCAD starts repeating the error below, resetting the local workspace state may restore the session.

How the error may appear in the console

Technical example · AutoCAD console

The observed symptom may appear immediately after the LSP file is loaded or while attempting to continue debugging:

AutoCAD console
; 239 forms loaded from "C:/.../TN.LSP"
; error: Exception occurred: 0xC0000005 (Access Violation)
; warning: unwind skipped on exception
2
; error: Exception occurred: 0xC0000005 (Access Violation)

What this example does not demonstrate

  • Error 0xC0000005 does not identify the cause by itself; this fix applies to the case in which the failure appeared while debugging from VS Code.

Quick fix

Instead of deleting the folder immediately, rename it so you keep a reversible backup:

  1. 01

    Save your files and close every VS Code window

  2. 02

    Confirm that Code.exe is no longer running

  3. 03

    Open %APPDATA%\Code\User

  4. 04

    Rename workspaceStorage to workspaceStorage.backup

  5. 05

    Reopen the project folder in VS Code

  6. 06

    Start AutoLISP debugging again

Additional context

VS Code recreates workspaceStorage when it opens again. Renaming the folder does not change project files, while preserving workspace-related state and history in case you need to recover them later.

This procedure fixed the environment in which the error was observed. If the exception also occurs outside the debugger or always at the same expression, inspect the routine, ActiveX/COM objects, plugins, and AutoCAD versions before repeating the reset.

Next step

Does your team depend on an AutoLISP routine that needs maintenance?

Describe the environment, when the failure began, whether it occurs outside the debugger, and which behavior the routine must preserve. Do not send DWG files, source files, or confidential information at this stage.

Describe the routine for assessment