Skip to content
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

Document how one can obtain and install this extension #10

Closed
ittaiz opened this issue Nov 11, 2018 · 8 comments
Closed

Document how one can obtain and install this extension #10

ittaiz opened this issue Nov 11, 2018 · 8 comments

Comments

@ittaiz
Copy link

ittaiz commented Nov 11, 2018

Hi,
I'd really like to use this :)
From the readme it's not clear how one should do this. I tried cloning the repo, building it with npm but then got stuck on installing vsce which I read is how I'm supposed to install manually built extensions.
If I'm on the right path I think documenting it will be super helpful. If I'm not then even more :)

Thanks for all your work...

@allevato
Copy link
Collaborator

Now that the debugger is in place and the extension has reached the point of being somewhat useful, I plan to spend some time over the next few days setting everything up to get it in the extension marketplace.

@ittaiz
Copy link
Author

ittaiz commented Nov 11, 2018 via email

@laurentlb
Copy link
Contributor

laurentlb commented Nov 13, 2018

I have no experience with VS Code, but I wanted to try it.

$ git clone https://github.com/bazelbuild/vscode-bazel.git
$ cd vscode-bazel
$ npm install
$ code
  • File > Open Folder > select the vscode-bazel directory
  • Ctrl-F5 - this opens another VS Code window
  • Open a directory with your Bazel project.
  • If everything goes well, you should see the list of targets under "Bazel Build Targets"
  • I've set breakpoint in my bzl file, but I didn't manage to get Bazel to break.

Here's the log:

INFO: Debugger connection successfully established.
Loading: 
Loading: 0 packages loaded
Analyzing: target //:aa (1 packages loaded, 0 targets configured)
DEBUG: /usr/local/google/home/laurentlb/tmp/bazel/a.bzl:2:3: hello
DEBUG: /usr/local/google/home/laurentlb/tmp/bazel/a.bzl:3:3: <rule context for //:aa>
INFO: Analysed target //:aa (1 packages loaded, 1 target configured).
INFO: Found 1 target...
[0 / 1] [-----] BazelWorkspaceStatusAction stable-status.txt
Target //:aa up-to-date (nothing to build)
INFO: Elapsed time: 1.106s, Critical Path: 0.01s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
INFO: Debug server listener thread closed; shutting down debug server and resuming all threads
INFO: Debug server listener thread closed; shutting down debug server and resuming all threads

So I know that the debugger was connected, I know that my code was evaluated (I've put breakpoints on the print lines`), but it didn't stop.

@allevato
Copy link
Collaborator

The logic to map local file paths to the file paths that Bazel sees internally when evaluating breakpoints is a little hairy. Could this be failing for you?

@laurentlb
Copy link
Contributor

Yes.
The variable sourcePathInExternal points to something that doesn't exist.

I got it to occasionally work using:
const sourcePathInExternal = path.join(this.bazelInfo.get("workspace"), relativeSourcePath);
but it's not reliable

@ittaiz
Copy link
Author

ittaiz commented Nov 27, 2018

Any update on this? Don't mean to badger but I'm super psyched about this :)

@allevato
Copy link
Collaborator

I've set up the marketplace but it looks like the release has an issue that wasn't present during development (#14). Since it's available now I'll close this specific issue, but keep an eye on that one for a resolution.

@ittaiz
Copy link
Author

ittaiz commented Nov 28, 2018

btw, it might be obvious to most people but I'd still add a sentence in the readme on how to obtain this extension

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants