-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[trace-debug] Marketplace release prep #20341
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# Move | ||
|
||
Provides language support for the Move programming language. For information about Move visit the | ||
language [documentation](https://docs.sui.io/concepts/sui-move-concepts). | ||
language [documentation](https://docs.sui.io/concepts/sui-move-concepts). It also provides early-stage | ||
support for trace-debugging Move unit tests using a familiar VSCode debugging interface (e.g., stepping | ||
through the code, tracking local variable names, setting line breakpoints). | ||
|
||
# How to Install | ||
|
||
|
@@ -28,7 +30,7 @@ its custom location location using VSCode's settings (`⌘` + `,` on macOS, or u | |
Preferences > Settings*). Search for the `move.sui.path` user setting, set it to the new location of | ||
the `sui` binary, and restart VSCode. | ||
|
||
In order to trace Move code execution, the `sui` binary must be built with the `tracing` feature flag. | ||
In order to trace-debug Move code execution, the `sui` binary must be built with the `tracing` feature flag. | ||
If your version of the `sui` binary was not built with this feature flag, an attempt to trace test | ||
execution will fail. In this case you may have to build the `sui` binary from source following these | ||
[instructions](https://docs.sui.io/guides/developer/getting-started/sui-install#install-sui-binaries-from-source). | ||
|
@@ -70,7 +72,6 @@ move-analyzer binary already exists in the default location (`~/.sui/bin` on mac | |
`C:\Users\USER\.sui\bin` on Windows), delete the existing move-analyzer binary and reinstall the | ||
extension. | ||
|
||
|
||
## What if everything else fails? | ||
|
||
Check [Sui Developer Forum](https://forums.sui.io/c/technical-support) to see if the problem | ||
|
@@ -101,8 +102,18 @@ Move source file (a file with a `.move` file extension) and: | |
- inlay hints: | ||
- types: local declarations, lambda parameters, variant and struct pattern matching | ||
- parameter names at function calls | ||
- If the opened Move source file is located within a buildable project you can build and (locally) | ||
- If the opened Move source file is located within a buildable project, and you have the `sui` | ||
binary installed, you can build and (locally) | ||
test this project using `Move: Build a Move package` and `Move: Test a Move package` commands from | ||
VSCode's command palette. You can also enable Move trace generation during test execution | ||
using `Move: Trace Move package execution` command from VSCode's command palette (traces will | ||
be available in the `traces` directory in JSON format). | ||
VSCode's command palette. | ||
- If the opened Move source file is located within a buildable project, and you have the `sui` | ||
binary installed, you can trace-debug execution of Move unit tests within this project. | ||
This functionality is provided by automatically including Move Trace Debugging | ||
[extension](https://marketplace.visualstudio.com/items?itemName=mysten.move-trace-debuggin) | ||
where you can find more detailed information about trace-debugging and the current level of support. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sentence is confusing to me, and I'm not sure it's saying this is automatically included in the larger Move IDE VSCode extension, or included in the move-trace-debugging extension (which is/is not automatically included with the IDE?). I think rewording/clarifying this may be helpful :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
Trace-debugging a Move unit test is a two-step process: | ||
tedks marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- first, you need to generate traces for Move unit tests by using `Move: Trace Move test execution` | ||
command from VSCode's command palette (traces will be available in the `traces` directory in JSON format) | ||
- second, you need to execute `Run->Start Debugging` menu command with Move file containing the test | ||
you want to trace-debug opened (if the file contains multiple tests, you will be able to select a specific one | ||
from a drop-down menu) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But this isn't actually true, right? It lets you run the tracing command, it requires another extension to do trace debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all intents and purposes it's true. When someone installs Move extension (after the next update of course), the Move Trace Debugging extension is installed automatically so from developer's perspective it's this extension that provides it (much like syntax highlighting is provided by a different extension and yet we list this feature in this README) The debugging instructions comment in the "Features" section clarifies this by saying that "This functionality is provided by automatically including Move Trace Debugging extension" (I did not think we need this particular piece of info right in at the top of this README page)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, could we say "The dependent extension,
${fully qualified extension name}
, also provides..." just to be explicit?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do say that later in the README where we describe how to actually trace-debug Move code:
"If the opened Move source file is located within a buildable project, and you have the
sui
binary installed, you can trace-debug execution of Move unit tests within this project. This functionality is provided by this (Move) extension automatically including the Move Trace Debugging extension"Not sure why we should throw this particular piece of information at the user right at the start, particularly that we don't at all mention that syntax highlighting is provided the same way (through a separate extension), unless you think we should do it as well. That being said, if you think it's crucial, I am not that strongly opposed to adding this info at the beginning, but still wanted to cast my vote here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to land it as is but happy to change it (or stamp a change) if need be