Skip to main content
DIGITAL CULTURETHE LAB / DIKULT105

NEXT AFTER VS CODE + LIVE PREVIEW

Code with AI.
Stay the author.

An AI assistant can write code in seconds. This guide shows you how to use one inside VS Code without handing over your decisions.

You need the folder and Live Preview from the setup guide. Eight steps: set up, ask well, read every change, test, and write down what you kept.

AI is optional. Every lab works without it. If you choose not to use AI, you do not have to explain why.

Start with step 1 ↓

Checkmarks stay in this browser only. Nothing is submitted or reported.

STEP 01

Make a safe place to experiment.

AI can change many lines at once. Before you invite it in, make sure you can always get back to a version that worked.

  1. Open your project folder in VS Code (File → Open Folder…) and start Live Preview, exactly as in the setup guide.
  2. Check that the page works before you ask for anything.
  3. Make a backup: in your file explorer, copy the whole folder and name the copy my-project-backup. If you already use GitHub, commit your work instead.
  4. Write one sentence on paper or in a note: what do you want to change, and why? Your intention exists before the AI does.

Check your screen: your page is open in Live Preview, and a backup folder exists next to your project.

STEP 02

Switch on an assistant in VS Code.

This guide uses GitHub Copilot, which is built into VS Code. It has a free plan that needs a GitHub account, with a monthly limit on chat messages and suggestions. Students can apply for more through GitHub Education.

  1. Do you have a GitHub account? If not, create one with the GitHub guide. You will need it later to publish anyway.
  2. In VS Code, select the Copilot icon at the top of the window or in the status bar at the bottom.
  3. Choose to sign in, and sign in with GitHub in the browser window that opens. Then return to VS Code.
Prefer an AI chat in the browser?

That works too. Copy the relevant part of your code into the chat, and copy answers back by hand. You lose the change review in step 5, so read even more carefully.

What you should never paste into an AI

Passwords and keys, your student number, other people’s personal information, or anything you would not want stored by a company. What you send is processed on the provider’s servers.

Check your screen: the Copilot icon no longer asks you to sign in.

STEP 03

Open the chat. Choose Ask.

  1. Open the chat: press Ctrl + Alt + I (Mac: Ctrl + Cmd + I), or select the chat icon at the top of VS Code.
  2. Find the mode menu at the bottom of the chat box and choose Ask. Ask mode explains and suggests, but does not change your files. You stay in charge of every edit.
  3. Give it your file: type # and choose the file, for example #style.css, or drag the file from the Explorer into the chat box.

ASK

Explains and suggests. Your files stay untouched. Start here.

EDIT

Changes the files you choose. You review each change.

AGENT

Plans and changes many files by itself. Powerful, and easy to lose track of. Not for today.

Mode names and menus can differ slightly between VS Code versions. Look for the option that answers without editing.

Grey text appears while I type?

That is Copilot guessing the next lines. Press Tab to accept or Esc to ignore. If it distracts you, ignore it and type on.

STEP 04

Write a prompt that keeps you in control.

A vague prompt hands the decisions to the AI. A good prompt has four ingredients: where, what, why and limits.

VAGUE

“Make my page better.”

Better how? The AI will pick fonts, colours, layout and extra features for you.

CLEAR

“In #style.css, change only the colours of body and h1 so the page feels like a grey rainy morning at a bus stop. Keep text contrast at least 4.5:1. Explain each line you change. Do not add fonts or animations.”

PROMPT BUILDER

4. Limits
WHEREWHATWHYLIMITS
In #style.css, … Change only what I asked for. Explain each line you change in plain language.

STEP 05

Read every line before you accept it.

AI answers sound confident, even when they are wrong. Your job now is editor, not recipient. Practise here first.

SPOT WHAT THE AI DECIDED

You asked: “In #style.css, make the background feel like a rainy morning. Change only colours.” The AI answered with the code below. Click every line it added without being asked.

Now review your own answer.

  1. For each line, ask: did I ask for this? Do I understand it?
  2. If a line is unclear, ask a follow-up: “Explain line 3 as if I have never written CSS.”
  3. Copy only the lines you understand and want into your file. In Edit mode, VS Code shows the changes in green and red with buttons to keep or undo each one.

STEP 06

Test it in Live Preview.

  1. Predict first. Say out loud what should change on the page.
  2. Save with Ctrl + S (Mac: Cmd + S) and look at Live Preview.
  3. Test it twice: click, reload, click again. Does it still behave?
  4. Did something break? Undo with Ctrl + Z, or go back to your backup. Then tell the AI exactly what happened: “After your change, clicking the heading does nothing. Here is my index.html.”

Check your screen: the change you intended is visible, and nothing else moved that you did not expect.

Still stuck? Send the AI a screenshot, or ask the community. See When you are unsure below.

STEP 07

Change one thing by hand.

This is the step that makes the code yours. Close the chat and edit at least one thing yourself:

  • change a colour to one you chose
  • rewrite text the AI invented
  • delete something you did not ask for
  • simplify a line you did not need
  • rename something so it makes sense to you
  • fix something that did not work

If AI wrote half the code but you made the decisions, who made the page? You do not have to answer that yet. Just notice which decisions were yours.

STEP 08

Log what the AI did, and what you did.

AI PROCESS LOG

Nothing here is saved or sent. Copy it before you leave the page.

The course rules come first

Check the current assignment brief in MittUiB before you use AI in assessed work. The final project restricts AI in making the work and does not allow AI-generated written analysis. Declare the help you used in the way the course asks. Unsure? Ask your lab assistant or Alinta.

WHEN YOU ARE UNSURE

Stuck? Show it, search it, ask someone.

Being stuck is part of making. Try one of these routes, and write down which one helped.

01 / SHOW THE AI

Send AI a screenshot

  1. Capture only the part that matters, for example your Construct event sheet or the error in VS Code. Windows: Win + Shift + S. Mac: Cmd + Shift + 4, then drag over the area.
  2. Paste it into the AI chat with Ctrl + V (Mac: Cmd + V), or drag the image file in. Copilot Chat in VS Code and most chat assistants accept images.
  3. Say what you expected and what happened.

“This is my Construct 3 event sheet. When I click the button, the text should change, but nothing happens. What should I check? Explain why, do not just fix it.”

Crop out your name, email, student number and other open tabs before you send it.

02 / SEARCH WITH THE IMAGE

No AI? Search with your screenshot

  1. Open Google Lens ↗ and upload your screenshot. In Chrome you can also right-click any image and choose Search image with Google.
  2. It finds pages, forum threads and videos that show the same screen, menu or error message.
  3. For an error, copy the exact message and search it in quotes: "Cannot read properties of null".

No chatbot needed: you get real pages from real people who had the same problem.

03 / ASK THE COMMUNITY

Ask people who use Construct every day

Search first: your question has often been answered. When you post, include your Construct version, a screenshot of the event sheet and what you have already tried.

05 / ASK A PERSON

Ask your lab assistant or a classmate

Say: “Can we look at this together?” Show what you expected, what happened and what you tried. Explaining the problem out loud often solves half of it.

Whatever helped, a forum post, a video, an image search or an AI answer, note it in your process log.

TAKE IT FORWARD

The software gives you possibilities. It does not give you a reason.

Use the checkpoints above to see what is ready and where you need help.

The reason is yours: the place, the feeling, the choice. Use AI to try things faster, and keep asking which decisions were yours.

Open the AI coding slides from the lab →

CHECK WHAT THE AI TOLD YOU ON W3SCHOOLSHTML tutorial ↗CSS tutorial ↗JavaScript tutorial ↗

Continue with JavaScript.

Write and test a click action in VS Code, then use it in Construct.

VS Code → Construct: step by step →