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
@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"

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
- Create a static or dynamically allocated 2d array and give it some random values
- Add a breakpoint somewhere
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.