Skip to content

Commit 9844153

Browse files
committed
Use MemoryViewer extension
1 parent cc677e3 commit 9844153

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ChangeLog
44
# V1.6.6
55
* `void *` variables now return `memoryReference` values.
66
* ST-LINK we now reserve four TCP ports when launching their gdb-server. We only use the first one but it done in case a second ST-LINK server is launched.
7+
* `Cortex-Debug: View Memory` command now uses a separate memory viewer extension if it is installed. https://marketplace.visualstudio.com/items?itemName=mcu-debug.memory-view. In the future, we may auto install the extension when this extension is installed. We would like to hear if you would like that. The download is about 1MB
78

89
# V1.6.4
910
* Issue #741: Could not determine gdb version from Fedora install

src/frontend/extension.ts

+19
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,25 @@ export class CortexDebugExtension {
416416
}
417417

418418
private examineMemory() {
419+
const cmd = 'mcu-debug.memory-view.addMemoryView';
420+
vscode.commands.executeCommand(cmd).then(() => {}, (e) => {
421+
const installExt = 'Install MemoryView Extension';
422+
vscode.window.showErrorMessage(
423+
`Unable to execute ${cmd}. Perhaps the MemoryView extension is not installed. ` +
424+
'Please install extension and try again. A restart may be needed', undefined,
425+
{
426+
title: installExt
427+
},
428+
{
429+
title: 'Cancel'
430+
}).then(async (v) => {
431+
if (v && (v.title === installExt)) {
432+
vscode.commands.executeCommand('workbench.extensions.installExtension', 'mcu-debug.memory-view');
433+
}
434+
});
435+
});
436+
return;
437+
419438
function validateValue(address) {
420439
if (/^0x[0-9a-f]{1,8}$/i.test(address)) {
421440
return address;

0 commit comments

Comments
 (0)