microsoft / microsoft/vscode-java-debug

Cannot watch the value of a 2d array "the type of the expression must be an array type but it resolved to int"

Open
#1,244 5 comments 0 reactions 1 assignee View on GitHub

@testforstephen is already working on this.

Since Jan 23, 2024.

ai-triaged bug evaluation
Dominant language
TypeScript
Stars
591
Forks
429
Avg merge
1d 9h
Merged PRs (30d)
19

Description

If you try to watch the value of a 2 dimensional array it will give you "the type of the expression must be an array type but it resolved to int"

image

Environment
  • Operating System: Windows 10
  • JDK version: 17.0.2
  • Visual Studio Code version: 1.72.2
  • Java extension version: v0.25.3
  • Java Debugger extension version: v0.45.0
Steps To Reproduce
  1. Create a static or dynamically allocated 2d array and give it some random values
  2. Add a breakpoint somewhere
  3. try to access a specific value of the array in the watch window (ex: array[0][1])
Current Result

Unable to access via watch the value of a 2d array when debugging.

Expected Result

Being able to do that

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.