×

Why I’m switching to VS Code. Hint: It’s all about AI tool integration

A look at the working IDE, with Copilot installed and waiting.

David Gewirtz / Elyse Betters Picaro / ZDNET

Well, I guess it had to happen. I used profanity and pejoratively scolded an AI. I'm not proud. You could say I did it to myself, and that is true. But I did this for you, so please read on. Let's make all this work worth it for both of us.

Also: Is ChatGPT Plus really worth $20 when the free version offers so many premium features?

In a few minutes, I'll tell you about my journey into and then back out of ChatGPT hell. But first, we need context. This is a story of switching IDEs. For most civilians, this means nothing. But for developers, such an action is momentous and painful.

What is an IDE?

IDE is the acronym for integrated development environment -- the tool and place where pro devs do their devving.

To a professional developer, an IDE is an on-screen cross between an operating room, a well-equipped and carefully laid-out workshop, a perfectly planned and optimized kitchen, and a command center.

Typical IDEs include a place to edit code, a debugger for diagnosing code problems, a terminal for quickly doing wizard-level magical incantations, a database interface for organizing data, a ton of additional tweaks and tools, and, increasingly, one or more AIs.

Also: The best AI for coding in 2025 (including a new winner - and what not to use)

The kitchen analogy works a bit here. There are the major appliances -- editor, debugger, and terminal -- roughly analogous to the stove, oven, and fridge. There are secondary smaller tools roughly on the scale of a microwave, blender and air fryer. Then there are all the other tools and resources that are integral to the process. Think of the pots and pans, all the various spatulas, spices, ingredients etc. For a good cook, these all have their places. Certain tools are preferred for one recipe, other tools for another.

An IDE requires a tremendous amount of configuration. Usually, that's done organically over time. We tweak everything from the exact style of code formatting we want, to the colors of keywords, to whether or not the curly braces get their own colors at each level. Every tweak is intended to aid in productivity and in quick and accurate comprehension.

Remember, our job is to interpret and create code—arcane languages and symbols that we have to get absolutely, perfectly right, or baaaad things could happen to hundreds or hundreds of thousands of users. It's a big responsibility.

My IDE for the last decade has been PhpStorm by JetBrains. JetBrains has become a titan in the IDE space, and PhpStorm is a brilliant IDE for WordPress plugin development, which uses PHP and JavaScript at its core. One of my income streams for that period has been a series of WordPress plugins, so that's where I've spent most of my time coding.

Also: How AI coding agents could destroy open source software

PhpStorm is probably the best IDE for PHP development I've found, which is why I used it for so long. The company also offers an integrated AI tool as an add-on to their services. But there's the rub. There's an AI. One. The one from JetBrains.

VS Code

Then, there's VS Code. VS Code is the open source code editor and IDE released by Microsoft. Yes, Microsoft. It's open source, incredibly flexible, and free. As such, it's become a juggernaut in the development world. There's VS Code, and then there's everything else.

Almost all IDEs are highly modular. That's pretty much table stakes for a tool that's meant to be customized for every developer's very individual needs. But VS Code is hugely modular, with thousands of plugins for almost everything.

Also: The most popular programming languages in 2025 (and what that even means)

VS Code also has a bunch of AI implementations. Almost all the major AIs have some sort of VS Code implementation as well. There are at least 20 add-ons to VS Code that provide AI features. VS Code also has exceptional Python support. Python, as we've shown, is the most popular programming language out there, and is particularly suited to AI development.

I'll be writing more and more Python in order to showcase how to use some of these AIs in your programs. This is a task particularly suited to VS Code.

Over the past few months, it's become more and more apparent to me that it's important to give you more VS Code-centric hands-on content. It's also become clear that trying to set up demo environments in VS Code while doing my production development in PhpStorm is a recipe for trouble.

Also: You can use OpenAI's super powerful AI coding agent Codex for just $20 now

So I recently made the big decision: move all my development from PhpStorm to VS Code.

This has been a non-trivial task. Separate from recreating all the personalized development tweaks I had in PhpStorm, of which there were hundreds, the challenge in moving to VS Code has been in getting all the major appliances to work properly.

PhpStorm, out of the box, does almost everything you need for PHP. On the other hand, while VS Code is enormously configurable, you have to do all that configuring.

Imagine you're a chef. At the core of your work environment is a perfectly dialed-in stove with oven. Every recipe you have is optimized for that appliance. But when you move to a new kitchen and try to bring over the stove, you find it won't fit. You have to modify the cabinetry, move gas and electric connections, and do a whole bunch of infrastructure customizations before you can use your core tool.

That's what it's been like getting my development environment up and running in VS Code, particularly the terminal and the debugger. That's also where I got into a shouting match with ChatGPT.

Artificial intransigence

Beyond the editor, debugger, terminal, and various tools, there's one more key component to my development stack: a container system called Local. Local manages individual WordPress installs, allowing me to switch between them and test my plugins in a working server environment.

Also: I test a lot of AI coding tools, and this stunning new OpenAI release just saved me days of work

Local was also tightly integrated into PhpStorm, especially for debugging. To make the move, I had to sever that connection and integrate Local with VS Code. There is a VS Code+Xdebug extension to Local (Xdebug being a popular PHP debugger), but it didn't work out of the box.

Neither did my terminal in VS Code, which bizarrely decided it wanted to be bash (an old-school shell program) and constantly spewed error messages because my profile was configured for zsh (a different shell). This kind of conflict can be maddening to any programmer who shoots out command-line instructions constantly during development.

I decided I'd get the shell working first, and then take on the debugger integration. To do this, I turned to ChatGPT, which eventually turned on me.

Also: How to use ChatGPT to write code - and my top trick for debugging what it generates

There is a point in virtually every Linux and command-line integration where you have to cut and paste command-line strings to make things work. Often, you get those strings from documentation or random posts by other developers. At some point, you wind up executing those strings on faith, often without fully understanding what they're meant to do.

It's not a good practice, but it's necessary if you want to get anything done.

So executing command-line strings provided by the AI isn't that big a leap in faith from executing command-line strings posted by ponyarse129 in a Stack Overflow thread.

And there it went. I asked ChatGPT how to fix the problem. ChatGPT gave me command-line strings. I pasted them in and tested the results. Rinse. Wash. Repeat.

Over time, though, we went deeper and deeper down the rabbit hole. ChatGPT was convinced (ultimately correctly) that Local was interfering with the terminal in VS Code. So it had me execute commands to sever that connection, ultimately completely zorching my Local configuration as well as my VS Code configuration.

At one point, the terminal (any terminal window) on my entire system was unusable, stuck in some kind of infinite loop of errors, with no way to get it to snap out of it. Even reboots didn't work. As soon as any terminal was opened, even using alternative terminal apps, the infinite loop of hell fired back up.

It was a fun morning.

I was using the Mac ChatGPT app, which lets me take screenshots and lets ChatGPT watch the Mac's terminal window. But then, suddenly, GPT-4o switched to o4-mini, and ChatGPT lost the complete thread. I'm using the paid Plus tier, so I didn't think I'd run out of queries, but I switched to the browser to continue.

I didn't realize how much I relied on the ChatGPT app integration. The browser version doesn't support dynamic screenshots or app linking, so everything took longer. Eventually, I switched back to the Mac app and it ran correctly.

Then ChatGPT decided to go down another nutball route, convinced I was running Docker and Docker was getting in the way of everything. Local does run Docker internally, but you can't configure it. ChatGPT didn't know that, and kept trying to make changes. No amount of explaining it to ChatGPT helped.

ChatGPT also kept looping back to terminal profiles, even after I'd finally gotten them working. I had moved on to trying to fix the debugger configuration. Basically, because this was a very long session, ChatGPT lost the thread. Repeatedly. It advised actions that broke stuff we'd already fixed, and broke stuff that wasn't even related to what we were trying to fix. And so on.

It was here that I started to call it names.

Sadly, I was not smart enough to stop the madness. Instead, I kept riding the ChatGPT roller coaster until I was nearly ready to throw up.

My reasoning, such as it was, was that we had gone so far down this road that I had lost the overall thread as well. If we exited the session, I'd have no way to figure out what had been done and how to recover it.

That, Dear Reader, was flawed reasoning. I didn't realize it at the time, which is why the profanity came out. To be clear, when programming, there's often profanity. It's a required language in computer science school. But swearing at the AI and calling it fairly obscene names? That was new. And distressing.

A new plan

Fortunately, there came a time when bodily functions demanded more attention than my terminal window. Some time during the walk to and from the bodily function room, I realized I needed to start over. The session I was hanging onto for dear life would never get any better.

I started a new ChatGPT session. In the new session, this ChatGPT didn't know about our previously futile endeavors. Conveniently, it also didn't know that I'd gone completely over the edge with insults and nastiness.

Put simply, when the session goes awry, start a new session. It worked.

In the new session, I decided to limit how much I told ChatGPT. I started by only telling it about the terminal settings problem. It wasn't able to diagnose the issue initially, because I had strategically withheld information it probably needed. I'd decided to play it that way because, in the previous session, once it had too much information for its own good, it insisted on only one course of possible remediation, which failed miserably.

I chose not to tell it about running a Local instance, and how that might impact the settings. I wanted to see what it would do if it had to discover, forensically, what was happening.

Then, as part of its attempt to diagnose the base problem, it gave me command-line strings that resulted in output that told us exactly what shell settings were running. We found that the errors were coming from configuration settings related to Local.

We then did the same with Xdebug. We identified the php.ini file that was actually in play, identified what was wrong with it, and modified it.

It took about 20 minutes, but I finally had the system doing what it was supposed to do. The key, in terms of AI instruction and prompt engineering, is simple. When it loses the thread, don't spend too much time trying to recover a frayed thread. It won't end well. Just start a new session, tell the AI the current state of the situation, and move on.

And with that, we can move on as well.

AIs in VS Code

The whole purpose of this exercise was to be able to explore the various AIs that work with VS Code. I'm not going to do that now, because this article is already a good length. But I do want to enumerate some of the resources we'll be individually exploring now that I'm coding in this environment.

  • GitHub Copilot and GitHub Copilot Agent: There's an on-device agent mode now in VS Code, and it's available for free.
  • ChatGPT integration via ChatGPT Work With Code: There's integration directly with the ChatGPT app and VS Code via an extension.
  • Continue and Cline: A sidebar assistant and terminal-first AI-friendly chatbot.
  • AWS CodeWhisperer: Amazon's coding helper for AWS-related projects.
  • CodeGPT: A tool developed by an individual developer that sends code or prompts to ChatGPT and other LLMs.
  • Gemini Code Assist: A VS Code extension that connects Gemini to VS Code.

And about 20 more. Plus, I'm sure we'll see more and more over time, because this AI thing isn't slowing down any time soon. We'll have plenty of opportunities to go into more depth about them.

Save and quit

Before I end this article, I want to send a shoutout to Ben Mewburn of Intelephense. He helped me set up some additional PHP-related IDE features that bring VS Code more up to parity with PhpStorm. He also helped me remove duplicate extensions I didn't need.

What about you? Have you tried switching IDEs recently, or are you still loyal to your long-time setup? What AI tools have you found most useful inside VS Code? Have you run into terminal or debugger headaches like these? How do you decide when to start a new AI session rather than stick with the one you're in? Let us know in the comments below.


You can follow my day-to-day project updates on social media. Be sure to subscribe to my weekly update newsletter, and follow me on Twitter/X at @DavidGewirtz, on Facebook at Facebook.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, on Bluesky at @DavidGewirtz.com, and on YouTube at YouTube.com/DavidGewirtzTV.

Get the morning's top stories in your inbox each day with our Tech Today newsletter.

Featured

Post Comment