Devlog: Hacktoberfest 2024 (2/4)

Peter Wan - Oct 11 - - Dev Community

Hello all! Today, I want to talk about my progress so far with regards to an issue I am trying to resolve for Visual Studio Code - one of, if not the most popular Text Editor in the world.

To sum up the issue, links that are opened within Visual Studio Code would open twice (incorrectly) in more than one tab, depending on a user's settings.

In the thread of the issue, you can see my comments that contains gifs of what I tested.

As a first time contributor to Visual Studio Code, there was quite a bit of setup I had to do.

Luckily, I was able to confirm with one of the lead maintainers of Visual Studio Code, Benjamin Pasero that really, I should be able to build Visual Studio Code from its source files if I follow through their contributing guide.

To that end, I spent a decent amount of time trying to install the necessary dependencies on my Windows machine. I had to update my installation of Visual Studio - not to be confused with Visual Studio Code, to have certain components enabled within it:

c++-stuff

mscv-stuff

I made sure to document every step of the way via screenshots to ensure I could test enabling and disabling certain features. The screenshot tool I use on Windows is called, ShareX, and I find it extremely useful with regards to pointing out certain elements in an image.

With part of the installations out of the way, I ran the other suite of commands listed on the Contributing guide until I finally got to this point, where I had built and ran the Visual Studio Code source code to produce a development version of Visual Studio Code (notice the difference in the icons):

built-and-run

I already felt like I overcame a huge hurdle just by building Visual Studio Code, but I wasn't done there.

I tried my hand at fixing the issue such that multiple tabs wouldn't open up when a user clicks on a link within Visual Studio Code.

While my solution seemed to work on my end, I had used a brute force way of implementing the solution, and this was evaluated by Benjamin in his review of my pull request.

To put it simply, there were other methods and libraries that abstract a lot of the logic I was trying to implement manually (but at the time of my first pull request, I was trying to just get something going). In hindsight, I think I should have more carefully evaluated the current methods and libraries being used.

As a tip: always try to use Ctrl + Left Click on a function or variable, to search for its definition

While I did do the above initially, I still think that I could have perhaps looked into leveraging the existing functions and dependencies further.

Long story short though, my pull request could be better, and I'm hoping to learn more about the inner workings of the existing code by testing its current implementation.

With regards to fixing the issue, it still hasn't been fully resolved, but Benjamin has added a quick fix to handle the different behaviours of the code, based on the platform the user is running when using Visual Studio Code (i.e., Windows vs Linux & Mac).

I believe what I want to do now is pull this hot fix change onto my local repository's main branch, and rebase my changes on top of it and continue working on this issue.

While I ultimately hope that my updated pull request is accepted as well, what I really hope to gain from this experience is the ability to troubleshoot better and learn more about this text editor that I love and use on a daily basis.

That's all I have to say for now - cheers!

. . . . . . . . . .
Terabox Video Player