Skip to content

Instantly share code, notes, and snippets.

@Ouroboros
Last active December 26, 2025 05:20
Show Gist options
  • Select an option

  • Save Ouroboros/1a1e0b9c8bcbac2a519516aa5a12a52b to your computer and use it in GitHub Desktop.

Select an option

Save Ouroboros/1a1e0b9c8bcbac2a519516aa5a12a52b to your computer and use it in GitHub Desktop.
Make Cursor Work with cppvsdbg

1. Modify cpptools/package.json

Remove this condition "when": "workspacePlatform == windows"

%USERPROFILE%\.cursor\extensions\ms-vscode.cpptools-1.23.5-win32-x64\package.json

    "type": "cppvsdbg",
    "label": "C++ (Windows)",
    "when1": "workspacePlatform == windows",

2. Bypass the signature verification of vsdbg.dll

Keyword signature

%USERPROFILE%\.cursor\extensions\ms-vscode.cpptools-1.23.5-win32-x64\debugAdapters\vsdbg\bin\vsdbg.dll

  body = sub_18008D374(Delimiter, "body");
  *(_OWORD *)signature = 0i64;
  si128 = _mm_load_si128((const __m128i *)&xmmword_1800D7CF0);
  LOBYTE(signature[0]) = 0;
  sub_18003A624(body, "signature", signature);
  v7 = signature;
  if ( si128.m128i_i64[1] > 0xFui64 )
    v7 = (void **)signature[0];
  if ( sub_1800B08EC(v6, v7) )      // <----- check signature, force String + 0x154 = 4
  {
    if ( *((_DWORD *)String + 0x154) != 4 )
      *((_DWORD *)String + 0x154) = 4;
  }
  else
  {
    *((_DWORD *)String + 0x154) = 5;
  }
.text:000000018006C09F 48 8D 15 9E 4B 06 00                    lea     rdx, aBody      ; "body"
.text:000000018006C0A6 48 8B CF                                mov     rcx, rdi
.text:000000018006C0A9 E8 C6 12 02 00                          call    sub_18008D374
.text:000000018006C0AE 0F 57 C0                                xorps   xmm0, xmm0
.text:000000018006C0B1 0F 11 44 24 20                          movups  xmmword ptr [rsp+58h+signature], xmm0
.text:000000018006C0B6 66 0F 6F 0D 32 BC 06 00                 movdqa  xmm1, cs:xmmword_1800D7CF0
.text:000000018006C0BE F3 0F 7F 4C 24 30                       movdqu  [rsp+58h+var_28], xmm1
.text:000000018006C0C4 C6 44 24 20 00                          mov     byte ptr [rsp+58h+signature], 0
.text:000000018006C0C9 4C 8D 44 24 20                          lea     r8, [rsp+58h+signature]
.text:000000018006C0CE 48 8D 15 43 57 06 00                    lea     rdx, aSignature_0 ; "signature"
.text:000000018006C0D5 48 8B C8                                mov     rcx, rax
.text:000000018006C0D8 E8 47 E5 FC FF                          call    sub_18003A624
.text:000000018006C0DD 48 8D 54 24 20                          lea     rdx, [rsp+58h+signature]
.text:000000018006C0E2 48 83 7C 24 38 0F                       cmp     qword ptr [rsp+58h+var_28+8], 0Fh
.text:000000018006C0E8 48 0F 47 54 24 20                       cmova   rdx, [rsp+58h+signature] ; pMessage
.text:000000018006C0EE E8 F9 47 04 00                          call    VerifySignature
.text:000000018006C0F3 84 C0                                   test    al, al
.text:000000018006C0F5 74 15                                   jz      short loc_18006C10C ; <-------- patch here
.text:000000018006C0F7 83 BB 50 05 00 00 04                    cmp     dword ptr [rbx+550h], 4
.text:000000018006C0FE 74 16                                   jz      short loc_18006C116
.text:000000018006C100 C7 83 50 05 00 00 04 00+                mov     dword ptr [rbx+550h], 4

Now, simply use a hex editor to modify 74 15 to 74 00 at 18006C0F5

@ionabio
Copy link

ionabio commented Jun 11, 2025

@REMvisual probably not as this is more of a workaround. You can disable extension's auto update from cursor.

@scenesea
Copy link

Cool! It works!

@forrlm
Copy link

forrlm commented Jul 5, 2025

thanks, i replaced it by searching word GT$ for version 1.23.1

@ingpt
Copy link

ingpt commented Sep 24, 2025

The latest version ms-vscode.cpptools-1.27.7-win32-x64(vsdbg.dll), file offset 0x6B4F6 15 -> 00

@kkzhang
Copy link

kkzhang commented Dec 10, 2025

But intellisense is still not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment