Issue Type: Bug When trying to ctrl + click on a component in React or import a file, it will load until eternity VS Code version: Code 1.55.2 (3c4e3df, 2021-04-13T09:36:32.643Z) OS version: Darwin.
Initialize the Git Repo. Make sure you are in the root directory of the project you want to push to. Vsc-webshark.mergecapFullPath: Specifies the absolute path incl filename to the mergecap binary. Defaults to 'mergecap'. Needs to be set after installation if mergecap is not reachable via search path. Vsc-webshark.events: Defined events used for time-sync event detection. Tree-view events need to have: level 0 and; label defined.
Using GitHub with Visual Studio Code lets you share your source code and collaborate with others. GitHub integration is provided through the GitHub Pull Requests and Issues extension.
To get started with the GitHub in VS Code, you'll need to create an account and install the GitHub Pull Requests and Issues extension. In this topic, we'll demonstrate how you can use some of your favorite parts of GitHub without leaving VS Code.
If you're new to source control and want to start there, you can learn about VS Code's source control integration.
Getting started with GitHub Pull Requests and Issues
Once you've installed the GitHub Pull Requests and Issues extension, you'll need to sign in. Follow the prompts to authenticate with GitHub in the browser and return to VS Code.
If you are not redirected to VS Code, you can add your authorization token manually. In the browser window, you will receive your authorization token. Copy the token, and switch back to VS Code. Select Signing in to github.com... in the Status bar, paste the token, and hit Enter.
Setting up a repository
Cloning a repository
You can search for and clone a repository from GitHub using the Git: Clone command in the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)) or by using the Clone Repository button in the Source Control view (available when you have no folder open).
Authenticating with an existing repository
Enabling authentication through GitHub happens when you run any Git action in VS Code that requires GitHub authentication, such as pushing to a repository that you're a member of or cloning a private repository. You don't need to have any special extensions installed for authentication; it is built into VS Code so that you can efficiently manage your repository.
When you do something that requires GitHub authentication, you'll see a prompt to sign in:
Follow the steps to sign into GitHub and return to VS Code. If authenticating with an existing repository doesn’t work automatically, you may need to manually provide a personal access token. See Personal Access Token authentication for more information.
Note that there are several ways to authenticate to GitHub, including using your username and password with two-factor authentication (2FA), a personal access token, or an SSH key. See About authentication to GitHub for more information and details about each option.
Editor integration
Hovers
When you have a repository open and a user is @-mentioned, you can hover over that username and see a GitHub-style hover.
There is a similar hover for #-mentioned issue numbers, full GitHub issue URLs, and repository specified issues.
Suggestions
User suggestions are triggered by the '@' character and issue suggestions are triggered by the '#' character. Suggestions are available in the editor and in the Source Control view's input box.
The issues that appear in the suggestion can be configured with the GitHub Issues: Queries (githubIssues.queries
) setting. The queries use the GitHub search syntax.
You can also configure which files show these suggestions using the settings GitHub Issues: Ignore Completion Trigger (githubIssues.ignoreCompletionTrigger
) and GitHub Issues: Ignore User Completion Trigger (githubIssues.ignoreUserCompletionTrigger
). These settings take an array of language identifiers to specify the file types.
Vsc Github Tutorial
Pull requests
From the Pull Requests view you can view, manage, and create pull requests.
The queries used to display pull requests can be configured with the GitHub Pull Requests: Queries (githubPullRequests.queries
) setting and use the GitHub search syntax.
Creating Pull Requests
You can use the GitHub Pull Requests: Create Pull Request command or use the + button in the Pull Requests view to create a pull request. If you have not already pushed your branch to a remote, the extension will do this for you. You can use the last commit message, the branch name, or write a custom title for the pull request. If your repository has a pull request template, this will automatically be used for the description.
Vs Github
Reviewing
Pull requests can be reviewed from the Pull Requests view. You can assign reviewers and labels, add comments, approve, close, and merge all from the pull request description.
From the description page, you can also easily checkout the pull request locally using the Checkout button. This will add a new Changes in Pull Request view from which you can view diffs of the current changes as well as all commits and the changes within these commits. Files that have been commented on are decorated with a diamond icon. To view the file on disk, you can use the Open File inline action.
The diff editors from this view use the local file, so file navigation, IntelliSense, and editing work as normal. You can add comments within the editor on these diffs. Both adding single comments and creating a whole review is supported.
Issues
Creating issues
Issues can be created from the + button in the Issues view and by using the GitHub Issues: Create Issue from Selection and GitHub Issues: Create Issue from Clipboard commands. They can also be created using a Code Action for 'TODO' comments.
You can configure the trigger for the Code Action using the GitHub Issues: Create Issue Triggers (githubIssues.createIssueTriggers
) setting.
The default issue triggers are:
Working on issues
From the Issues view, you can see your issues and work on them. By default, when you start working on an issue, a branch will be created for you. You can configure the name of the branch using the GitHub Issues: Working Issue Branch (githubIssues.workingIssueBranch
) setting. The commit message input box in the Source Control view will be populated with a commit message, which can be configured with GitHub Issues: Working Issue Format SCM (githubIssues.workingIssueFormatScm
).
If your workflow doesn't involve creating a branch, or if you want to be prompted to enter a branch name every time, you can skip that step by turning off the GitHub Issues: Use Branch For Issues (githubIssues.useBranchForIssues
) setting.
This Visual Studio Code(tm) extension adds support to open pcap/network files. It allows as well to 'filter' (create smaller) pcap/pcapng files with a freely-configurable, multi-steps assistant.
Note: The time-sync feature works well with extension and for DLT (diagnostic log and trace) files.
Note: It acts mainly as a UI to a local Wireshark™ installation. So Wireshark (incl sharkd) need to be locally installed.
Note: Currently I do find 'sharkd' for Windows only as part of the Wireshark Win32 Portable packages win32/WiresharkPortable_latest. Extracting the wireshark folder into any local folder and pointing the sharkdFullPath setting to it seems to work (so keeping the regular installation untouched).
Note: Under Linux® the default Debian package doesn't install 'sharkd'.With Ubuntu 20.04-LTS installing package 'tshark' seems to be sufficient.
If you install from source (git clone https://github.com/wireshark/wireshark; cd wireshark; mkdir build; cd build; cmake -DBUILD_wireshark=OFF .. ; make ; ./run/sharkd - <- should build sharkd and print a 'Hello from client'. The path to this binary should be sufficient. Caution might be needed on the plugin directory location. You can keep the default option -DBUILD_wireshark=ON as well but its not needed. Check the list of compile dependencies (e.g. glib-2.0-dev libpcap-dev libgcrypt20-dev lib-c-ares-dev liblua5.3-dev lua5.3 )
Features
- Open 'pcap'/'pcapng' network capture files. Use command 'Open pcap file...' or with vscode >=1.46 directly open cap/pcap/pcapng files.
- Display filter with known syntax from wireshark
- Time sync feature.
- Calculates time for each frame based on timestamp and broadcasts the time to the other Time sync extensions so that they reveal the fitting time ranges.
- Automatic time-sync based on freely-configurable events that get broadcasted to other extensions so that time shifts between documents are adjusted automatically. (todo add example)
- Manual offset for the time via context menu item adjust-time....
- If a time was received already the adjust-time... will propose to adjust/sync the selected line to the received one.
- Tree-view with freely-configurable events based on display filter syntax allows to provide a kind of structure of the frames captured. Selecting an event reveals the frames close to that reception time (even the frames are not part of the current display filter).
- Filter pcap files assistant (mainly to reduce size and ease further analysis). Use command 'Filter pcap file...'. This generates and executes Wireshark-tshark based filter expressions and executes them to create a new pcap files with only the filter matching frames. The steps are fully configurable. The default settings provide filter on MAC addresses, udp dest ports, tcp dest ports and an additional filter expression.
- Extract DLT from pcap assistant that allows to extract DLT files directly from pcap files. Use command 'Extract DLT from pcap file...' and select/confirm the UDP port and choose the devices/MAC addresses that sent the DLT data.
- Merge pcap files i.e. allow to use multiple input pcap files for Filter pcap and Extract DLT. The input files will be passed to mergecap tool first and merged based on frame timestamps.
The extension uses telemetry with two events (open file
, errorcode as parameter or filter pcap
) if telemetry is activated within your general configuration.
Planned features
- make it look nicer / more compliant to schema.
- indicate running background tasks
Requirements
sharkd (and tshark) binary from Wireshark needs to be locally installed. If installed via 'brew' on OSX its installed by default. For Win32/64 and Linux see notes above.
Extension Settings
This extension contributes the following settings:
vsc-webshark.sharkdFullPath
: Specifies the absolute path incl filename to the sharkd binary. This needs to be set after installation.vsc-webshark.tsharkFullPath
: Specifies the absolute path incl filename to the tshark binary. Defaults to 'tshark'. Needs to be set after installation if tshark is not reachable via search path.vsc-webshark.mergecapFullPath
: Specifies the absolute path incl filename to the mergecap binary. Defaults to 'mergecap'. Needs to be set after installation if mergecap is not reachable via search path.vsc-webshark.events
: Defined events used for time-sync event detection.- Tree-view events need to have:
level
> 0 andlabel
defined. The label can contain {0} for the %i info column or {1}, {2} ... replacements for the values.displayFilter
: any Wireshark display filter expression like 'tcp' or 'upd or http.request'values
: array of strings referring to Wireshark column/display filters like %t or http.request:0 (take care about the :0. It's not the slice operator but the occurrence if that expression is defined by multiple protocols in the proto tree). Values can be referred to from label via {1..n}.
- Tree-view events need to have:
- Time-sync events additionally have (level and label optional):
timeSyncId
providing the id for the time-sync eventtimeSyncPrio
defining the prio of this event. Other documents use the lowest value (=highest prio) to define which events to use for time adjustment (so whether to use just broadcast their own defined ones or in case of a timeSyncId and timeSyncValue match to adjust the time).conversionFunction
can be used to modify the time-sync value calculated for that event. Needs to be a JS function returning a string. If not used the values are concated by ' ' and if no values defined by info column.
vsc-webshark.filterSteps
: defines the configurable steps of the 'filter pcap file...' assistant. See the default/configuration for an example. (Todo: provide a full description). Please consider using '-C ' in filterArgs and listProvider to use tshark with a minimal configuration (only the plugins activated that you do need for the used filters) to speed up processing significantly. The configuration allows to use multiple steps and chained/piped filters to start with a minimal config and use your default config with more complex plugins/filter expressions (e.g. someip/someipsd plugin) in later steps.vsc-webshark.extractDltSteps
: similar to filterSteps but for the 'extract DLT from pcap file...' function.vsc-webshark.extractDltArgs
: arguments used for tshark to extract the DLT message payload from the pcap file.
Known Issues
Little testing done yet.Little documentation.
- layout not adapting height.
- Scheme colors/options only partially used. Might not be readable/useable in some settings. I used a dark scheme during development only.
- use getState/setState instead of retainContextWhenHidden
- selected frame, ... not persisted on reopen
- pcapng support in sharkd seems limited. Some files can be opened. Some can't (e.g. test102.pcapng from pcapng-test-generator). Consider converting them first.
Release Notes
See Changelog
Contributions
Any and all test, code or feedback contributions are welcome.Open an issue or create a pull request to make this extension work better for all.
Donations are welcome!
Third-party Content
This project leverages the following third party content:
node-webshark
Vsc Connect To Github
- Source: https://github.com/QXIP/node-webshark
- License: GPL-2.0 https://github.com/QXIP/node-webshark/blob/master/LICENSE
Visual Studio Code Github Push
node-webshark is based on webshark by Jakub Zawadski:
- Source: https://bitbucket.org/jwzawadzki/webshark/src/master/
- License: GPL-2.0
Github On Vscode
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.