Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Mock Data GeneratorNew to Visual Studio Code? Get it now.
Mock Data Generator

Mock Data Generator

BuddieKodex

|
665 installs
| (1) | Free
Generate realistic, relationship-aware mock data from TypeScript, JavaScript, Prisma, Mongoose, TypeORM, Drizzle and Zod models. Export data or populate databases.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Mock Data Generator for VS Code

Generate mock data from the models already in your project. The extension reads your TypeScript, JavaScript, Prisma, Mongoose, TypeORM, Drizzle and Zod models, and the tables your SQL creates, generates records whose foreign keys point at each other, and writes them out as JSON, SQL, CSV and other formats, or inserts them straight into a database.

Features

  • Finds your models: TypeScript interfaces and classes, JavaScript classes, Prisma schemas, Mongoose schemas, TypeORM entities, Drizzle tables and Zod schemas, in the files listed under Where models are found.
  • Reads the tables your SQL creates: CREATE TABLE in .sql files and in SQL strings in your code (pool.query(...), migrations), with the ALTER TABLE changes after it. See Tables created with SQL.
  • Or reads them from your database: PostgreSQL, MySQL, SQLite, SQL Server and MongoDB, whatever language or ORM created the tables. See Generate from Database Schema.
  • Related records that agree: foreign keys point at records that exist, and records that reference each other are paired (a user's payment belongs to that user). Dates agree across them too: an order is placed after its user signed up, and a payment after its order.
  • Different counts per model: for example 10 users, 30 orders and 50 order items.
  • Values that fit the field and the model: names, emails that match the name, phone numbers, addresses, ages, prices, dates, avatar and image URLs, product and company names (name on a Product is a product name), and English text for titles and descriptions.
  • Dates that agree: within a record, createdAt comes first (within the last two years), and updatedAt, lastLoginAt, paidAt and other events fall between it and today. Events with a known order follow each other (placed, paid, shipped, delivered), and updatedAt comes last. Due, expiry and renewal dates are ahead, each end date follows its start (startDate → endDate, trialStartsAt → trialEndsAt), and birth dates give an adult age. Emails and usernames are made from the record's name (Jane Doe → Jane.Doe@…), wherever the name field is declared.
  • Nested objects: profile: { bio: string }, JavaScript object defaults, Mongoose nested paths and arrays of subdocuments are generated as objects with their own fields. A ref inside a subdocument points at a real record.
  • Constraints: enums and string-literal unions ('active' | 'banned'), unique fields (@unique, unique: true), @min / @max / @minLength / @maxLength / @enum JSDoc tags, and Mongoose enum / min / max / minlength / maxlength.
  • Output formats: JSON, SQL, CSV, GraphQL, TypeScript, REST API mock and tab-separated values.
  • Database population: MySQL, PostgreSQL, SQLite, SQL Server, Oracle and MongoDB, with a report of the rows inserted into each table.
  • Preview before writing: see the first rows of every table, then insert, regenerate or cancel. See Preview.
  • Docker: start a MongoDB, MySQL, PostgreSQL or SQL Server container to fill; the extension waits until it accepts connections and fills in the connection details.
  • Field rules: set ranges, weighted choices, fixed values, patterns or templates for particular fields in your settings, e.g. price between 5 and 500 or status 70% "active". See Field Rules.
  • Password fields: hashed with bcrypt, all from one known password, so you can log in as any generated user.
  • Locales: names, addresses and currency amounts in en_US, fr_FR or ja_JP.
  • Model diagrams: a Mermaid class diagram, an HTML page or JSON.

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X or Cmd+Shift+X)
  3. Search for "Mock Data Generator"
  4. Click Install

Quick Start

  1. Open your project folder in VS Code
  2. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  3. Run "Mock Data Generator: Generate Mock Data"
  4. Enter the number of records per model
  5. Choose whether every model gets that count, or set counts for some models (see Record Counts)
  6. Select the output format
  7. The data opens in a new, unsaved editor tab. If you chose Database, the extension asks for the connection details and then reports the rows inserted into each table.

Supported Models

Model Type File Extensions Notes
TypeScript Interfaces .ts Mark one with /** @model */ to always include it
TypeScript Classes .ts With or without decorators
JavaScript Classes .js Field types from default values and JSDoc @type
Prisma Schema .prisma All models, @relation, @unique, @@map, @map
Mongoose Schema .js, .ts mongoose.Schema definitions, ref fields and timestamps
TypeORM Entities .ts @Entity classes, their relation decorators, and @CreateDateColumn / @UpdateDateColumn
Drizzle Tables .ts, .js pgTable, mysqlTable, sqliteTable; foreign keys from .references()
Zod Schemas .ts, .js z.object schemas, including .extend, .merge, .pick, .omit
SQL .sql, .ts, .js CREATE TABLE and the changes after it, see Tables created with SQL

Drizzle: a table becomes a model named after its variable (orderItems → OrderItem) and keeps its table and column names. .notNull(), .unique(), varchar lengths, enums (pgEnum, mysqlEnum, text({ enum })) and SQLite modes ({ mode: 'boolean' }) are respected.

Zod: UserSchema becomes User. Formats (.email(), .url(), .uuid(), .datetime()), .min / .max / .length, .int(), .optional(), z.enum, z.nativeEnum and literal unions are respected. Zod has no foreign keys, so userId links to User by name. Schemas for requests, responses and settings (CreateUserSchema, UserResponseSchema, envSchema) are skipped, and a schema used only inside another one (address: AddressSchema) is generated as a nested object unless it is exported.

Nested objects are written as JSON: a JSON column in MySQL, jsonb in PostgreSQL, text in SQLite and SQL Server, and a CLOB in Oracle. MongoDB stores them as subdocuments.

A small interface with only an id and one or two fields can be skipped as "not a model". Mark it with /** @model */ to include it; the other interfaces are still found. When the project has Prisma, Mongoose, TypeORM, Drizzle or Zod schemas, or tables created with SQL, those are used and untagged interfaces and classes are skipped.

In TypeScript, an id next to an object of another model (managerId?: number with manager?: User) links to that model.

Where models are found

By default the extension looks in files that match these patterns, ignoring node_modules, dist, out and build:

*Model.ts, *.model.ts, models/*.ts, *.entity.ts, entity/*.ts, entities/*.ts, *.schema.ts, schemas/*.ts, schema.ts, schema/*.ts (and the same for .js), and *.prisma.

If your models live somewhere else, add a pattern to mockDataGenerator.modelFilePatterns. The setting replaces the defaults rather than adding to them, so keep the default patterns you still need. If files that the defaults would find are left out by your setting, the extension tells you which setting to change.

Tables created with SQL

Many projects create their tables with SQL rather than an ORM: a schema.sql, numbered migrations, or CREATE TABLE IF NOT EXISTS strings run by a database.ts at startup. The extension reads those tables, so their models match what is really in the database.

Where it looks. mockDataGenerator.sqlFilePatterns is a setting of its own, so changing modelFilePatterns doesn't affect it. The defaults are *.sql, *database*.ts, db.ts, db/*.ts, migrations/** and migration/**, with .js for each. In code, only the strings and templates that hold CREATE TABLE, ALTER TABLE or CREATE TYPE are read. Test files, files over 5 MB (data dumps) and files that undo a migration (*.down.sql, Flyway's U1__*.sql) are skipped. So is the "down" part of a migration: a down() method, -- migrate:down, or -- +goose Down.

What it reads.

  • CREATE TABLE:
    • columns and their types, NOT NULL, DEFAULT, string lengths and arrays;
    • primary keys (composite too), unique columns and foreign keys. A bare REFERENCES users points at the users key;
    • enums: CHECK (status IN ('a', 'b')), PostgreSQL CREATE TYPE … AS ENUM (with its ALTER TYPE … ADD VALUE) and MySQL ENUM(…);
    • serial, AUTO_INCREMENT, IDENTITY and GENERATED columns, which the database fills.
  • The changes after it: ALTER TABLE ADD/DROP/RENAME COLUMN, RENAME TO, ALTER COLUMN … TYPE, SET/DROP NOT NULL and ADD/DROP CONSTRAINT, MySQL's MODIFY and CHANGE, CREATE UNIQUE INDEX on one column, and DROP TABLE.
  • Dialects: PostgreSQL, MySQL, SQLite and SQL Server, including statements inside a PostgreSQL DO $$ … $$ block.

Statements are applied in the order they run: top to bottom in a file, and files in path order, so 001_init.sql comes before 002_add_email.sql. Each table keeps its name and column names (orders, order_items.unit_price), so field rules use them: "orders.total".

Links. Foreign keys link tables as they do in the database. Without one, a column links by name only when it names a table exactly, so user_id links to users, even in another service. email, vendor_id (with no vendors table) and payment_method_id stay plain values.

Next to your other models. Each service's SQL is read on its own, so two services can each have a processed_events table. Within a service, the SQL tables count as a formal schema: they replace plain TypeScript interfaces that describe the same records less precisely. A table that a Prisma, TypeORM, Drizzle or Mongoose model in the same service already maps is left out, so TypeORM migrations and the SQL that Prisma writes don't duplicate your models.

Not read:

  • a table name built at run time (CREATE TABLE ${name});
  • SQL kept in a constant imported from another file, unless that file matches sqlFilePatterns;
  • views, functions, triggers and CREATE TABLE … AS SELECT;
  • SQL in other languages' code (Go, Python, C#). For those, use Generate from Database Schema.

Set sqlFilePatterns to [] to read no SQL.

Repositories with several services

In a monorepo of services (services/auth-service, services/order-service...), each model belongs to the nearest folder above it with a package.json, go.mod, *.csproj, pyproject.toml, pom.xml or similar project file. When there is more than one, the extension:

  • asks which services to generate data for (all are ticked), and groups the models by service in the sidebar;
  • applies the "formal schemas win" rule per service, so one service's Prisma schema no longer hides another service's interfaces;
  • keeps a model name once per service, so two services can each have a User. Those are named after their service (auth-service/User, vendor-service/User), in the generated data and in field rules ("auth-service/User.email"). Names that appear in one service only stay as they are;
  • links a field to a model of its own service first (Store.userId in vendor-service → vendor-service/User), and to another service's model when its own service has none of that name and exactly one other service does (Payment.orderId in payment-service → order-service's Order).

All the services are generated in one run, so ids line up across them: Order.user_id in order-service holds the ids of auth-service's users. A linked id takes the type of the field holding it, so a user_id: string holds "42" when User has number ids. When it can't (a uuid into a number field), the field gets random values and the generation notes say so.

One database per service. With Database as the output, each service is asked in turn where its data goes: the same database as an earlier service, another database, or nowhere (skip). Each database gets only its own services' tables. One that can't be reached is reported, and the others are still filled. The choices are remembered for the workspace, and the next run offers Use saved connections. Passwords and connection strings are kept in VS Code's secret storage, never in settings.

Connections found in your files. The extension looks at each service's .env files (.env, .env.local, .env.development) and at the compose service that runs its folder (env_file: and environment: in docker-compose.yml, plus docker-compose.override.yml). The databases it finds are offered first, so a service's question can be one click: postgres database marketplace_orders on 127.0.0.1:12432, found in services/order-service/.env. It reads:

  • URLs: DATABASE_URL, POSTGRES_CONNECTION_STRING, MONGO_URI and similar (postgres://, mysql://, mongodb://, sqlserver://, file: for SQLite);
  • key=value DSNs, as Go and libpq write them (host=postgres dbname=shop port=5432);
  • .NET connection strings (Server=…;Database=…, ConnectionStrings__Default);
  • separate settings: DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD, and the PG*, POSTGRES_*, MYSQL_*, MONGO_* and MSSQL_* forms.

A host that is a compose service (postgres:5432) only works inside Docker's network, so it is replaced by the port that service publishes (127.0.0.1:12432). Each service gets the port of the container its own settings name, so one service on PostgreSQL and another on MongoDB each get theirs. When the port isn't published, the connection is listed with the reason, and you enter it yourself. A user or password the service doesn't set comes from the database container (POSTGRES_PASSWORD...).

Your .env files stay on your machine.

  • What is read: only .env, .env.development, .env.local and .env.development.local in the workspace root and in each service folder, docker-compose.yml / compose.yaml and their .override file, and the env_file: files they name. There's no search through the repository, and no file outside the workspace is read, even when a compose file points at one (../secrets/prod.env). Example files (.env.example) and other compose files (docker-compose.prod.yml) are skipped.
  • What is used: only database settings. Other values in those files (API keys, tokens) are used only to fill ${VAR} references, and are never shown, logged, stored or sent anywhere.
  • What is stored: nothing, unless you pick a found database. The connection is then remembered like one you typed, with its password in VS Code's secret storage. Lists, logs and messages show only the database type, name, host and port, never a password or connection string.
  • When: only when you fill a database, or run Generate from Database Schema. Nothing connects until you pick one. In a workspace you haven't trusted (VS Code's Restricted Mode) the extension doesn't run at all.
  • Turning it off: set mockDataGenerator.readConnectionFiles to false to always type the connection yourself.

A service whose data lives in two databases (PostgreSQL for its tables, MongoDB for events) has both listed, and one is filled per run.

The same list is offered when you fill a single database, and by Generate from Database Schema.

A file per service. With a file format (JSON, SQL, CSV...), you can keep every service in one file, open one file per service, or save each as <service folder>/seed/mock-data.<ext>. Existing seed files are replaced only after you confirm.

A single project works as before.

Generate from Database Schema

When your tables are created in another language (Go, C#, Python), by an ORM the extension doesn't read, or by SQL it can't follow, run Mock Data Generator: Generate from Database Schema instead. It connects to the database, reads its tables and fills them:

  1. Pick a database found in your .env or compose files, or enter the connection details (or start a Docker container), as for a database fill.
  2. Pick the tables to fill. Tables kept by migration tools (_prisma_migrations, __EFMigrationsHistory, knex_migrations, flyway_schema_history...) start unticked. If a table you picked needs rows in another (a required foreign key), that table is filled too.
  3. Choose the record counts and the output, as usual. Database inserts into the same database, with no more questions; the other formats give you the data as a file.

What is read:

  • PostgreSQL, MySQL, SQLite, SQL Server: columns and their types, NOT NULL, string lengths, primary keys, foreign keys, unique columns, enums (PostgreSQL enum types, MySQL ENUM, and CHECK (status IN ('a', 'b')) constraints), and computed columns, which are left for the database to fill. Table and column names are kept as they are, so field rules use them: "orders.total". A column without a foreign key links by name only when it names a table exactly (user_id → users). No rows are read.
  • MongoDB: collections have no schema, so up to 200 documents of each are sampled to find their fields and types. An ObjectId field named after a collection (userId, authorIds) links to it. Only field names and types are kept; the values are not stored or sent anywhere.
  • Oracle isn't supported yet.

Output Formats

Format Description
JSON Structured JSON data
SQL INSERT statements
CSV Comma-separated values
GraphQL Queries and mutations
TypeScript Interface declarations with data
API Mock REST API response format
Excel Tab-separated values (opens in Excel)
Database Inserts the records into a database

Database Support

Database Driver Docker container
MySQL mysql2 Yes
PostgreSQL pg Yes
SQLite Built in (WebAssembly), works on every OS Not needed
SQL Server mssql Yes
Oracle oracledb (thin mode, no Oracle client needed) No
MongoDB mongodb (also Atlas mongodb+srv://) Yes

The extension can create missing tables, clear existing rows before inserting, and insert parents before children. Tables that reference each other are filled in two steps: the rows go in first, then the references are set. Clearing tables only touches the tables of your models.

While data is generated and inserted, the notification shows the model or table it is on and how many records are done. Cancel stops the run:

  • During generation, nothing is saved or written.
  • During a PostgreSQL fill, everything is rolled back, so the database is left as it was.
  • With the other databases, the rows already inserted stay. The message lists how many rows each table got, which tables were not filled, and which were cleared before the stop.

Connecting

You connect with either a connection string or the host, port, database name, username and password:

  • Local or hosted servers: enter the details, or paste a connection string such as postgres://user:pass@host:5432/db or a MongoDB Atlas mongodb+srv:// URI.
  • Docker: if Docker is running, the extension offers to start a container for MySQL, PostgreSQL, SQL Server or MongoDB. It downloads the image the first time, waits until the database accepts connections, creates the mock_data database and fills in the connection details. An existing container is reused with the port and password it was created with. If you closed the message before copying the connection string, click the container in the sidebar (or run Mock Data Generator: Manage Database Containers) and choose Copy Connection String; it is read back from the container, password included. You can also run Mock Data Generator: Create Database Container, or write a Docker Compose file with Mock Data Generator: Generate Docker Compose File. Images are pinned (mongo:7, mysql:8.4, postgres:16, SQL Server 2022); see docs/docker-setup.md.

Connection security

  • Credentials are used for the current run only. They are not saved in settings or extension storage.
  • Passwords and connection strings are masked while you type them.
  • SSL/TLS: when you enter the connection details, you choose between no SSL, SSL with the server certificate verified, and SSL that allows a self-signed certificate (not checked). Oracle connects over tcps:// and always verifies the certificate; for a self-signed Oracle server, use a wallet in a connection string. With a connection string, SSL is set in the string itself (for example ?sslmode=require).

Example

Given these interfaces in src/models/user.ts:

export interface User {
  id: number;
  firstName: string;
  lastName: string;
  email: string;
  age: number;
  status: 'active' | 'invited' | 'banned';
  profile: {
    bio: string;
    website: string;
  };
}

export interface Post {
  id: number;
  title: string;
  userId: number;
}

Generating 2 users and 3 posts as JSON gives:

{
  "User": [
    {
      "id": 1,
      "firstName": "Arden",
      "lastName": "Satterfield",
      "email": "Arden_Satterfield72@gmail.com",
      "age": 46,
      "status": "active",
      "profile": {
        "bio": "I'll index the open-source GB firewall, that should bandwidth the PNG protocol!",
        "website": "https://afraid-latency.name/"
      }
    },
    {
      "id": 2,
      "firstName": "Marietta",
      "lastName": "Schneider",
      "email": "Marietta.Schneider6@gmail.com",
      "age": 60,
      "status": "banned",
      "profile": {
        "bio": "Try to navigate the SMS feed, maybe it will connect the solid state program! I'll parse the auxiliary VGA application, that should pixel the FTP port!",
        "website": "https://embarrassed-cob.name"
      }
    }
  ],
  "Post": [
    { "id": 1, "title": "Secured transitional task-force", "userId": 1 },
    { "id": 2, "title": "Customer-focused heuristic interface", "userId": 2 },
    { "id": 3, "title": "Innovative optimizing frame", "userId": 2 }
  ]
}

Every userId is the id of a generated user. Text such as bios and titles is made-up English: readable, but not about your domain.

Preview

Before anything is written to a database, a preview opens with a tab for each table. Each tab shows the first 20 rows and the table's full count. Foreign key columns show the model they point at (userId → User), and notes from the run, such as field rule problems or adjusted counts, are listed at the top. Then you choose:

  • Insert into database writes exactly the data you see.
  • Regenerate makes a new set. If you edited the field rules in the meantime (the Edit field rules link opens them), the new set uses them. With a fixed seed setting, Regenerate uses a new seed for that run only.
  • Cancel, or closing the preview, writes nothing.

mockDataGenerator.previewBeforeInsert sets when the preview opens: "database" (the default), "always" (file outputs too) or "never".

Record Counts

When you generate, you enter a default count and choose how it applies:

  • Same count for every model: every model gets the default count.
  • Set counts per model...: pick the models that need a different count (for example 10 users, 30 orders). The list shows what each model references. Your choices are remembered for the next run.
  • Reuse last per-model counts: generate again with the counts from last time.

Relationships stay consistent when counts differ:

  • Many-to-one (Order.userId): records are spread evenly over their parents, so 30 orders over 10 users gives each user 3 orders.
  • Unique foreign keys (one-to-one, such as Profile.userId @unique): there can't be more records than parents. A required one is capped at the parent's count, and you are told. An optional one stays empty once every parent is taken.
  • Models that reference each other (User.paymentId and Payment.userId): records are paired, so a user's payment always belongs to that user. Extra records on the larger side belong to an existing record of the smaller side (30 payments over 10 users), or stay empty if the link is optional.

A field that looks like a foreign key to a model the extension did not find (for example categoryId with no Category model) gets a random number, and you are told which fields those are. Add the model's file to modelFilePatterns to link it. A foreign key to a model you excluded is left empty if it is optional, and reported if it is required.

Field Rules

To control the values of particular fields, add mockDataGenerator.fieldRules to your workspace's .vscode/settings.json, so everyone on the project gets the same data. Keys are Model.field, or *.field for that field in every model (a Model.field rule wins over a *.field one):

"mockDataGenerator.fieldRules": {
  "Product.price":  { "min": 5, "max": 500, "decimals": 2 },
  "Order.quantity": { "min": 1, "max": 3 },
  "User.status":    { "values": { "active": 70, "pending": 25, "banned": 5 } },
  "User.role":      { "values": ["admin", "member"] },
  "User.country":   { "value": "NG" },
  "Order.code":     { "pattern": "ORD-[0-9]{6}" },
  "User.email":     { "template": "{firstName}.{lastName}@acme.test" },
  "User.username":  { "faker": "internet.userName" },
  "*.createdAt":    { "after": "2024-01-01", "before": "now" },
  "Order.notes":    { "nullChance": 30 }
}
Option Value
value Always this value
values A list to pick from with equal odds, or an object of weights ({ "active": 70, "banned": 30 })
min, max, decimals A number in range; whole numbers unless the bounds have decimals or decimals is set
after, before A date in range ("2024-01-01", "2024-06-30T12:00:00Z" or "now"); text fields get an ISO date string
pattern Text matching a simple regular expression: literal text, [a-z] / [^a-z] sets, and {n}, {n,m}, ?, *, +
template Text built from the record's other fields (foreign keys included), {id}, and {index} (the record number)
faker Any faker method that takes no arguments, by name (company.name, location.city)
nullChance Percentage of records where the field is null; combine it with any of the above

A rule uses one of value, values, min/max, after/before, pattern, template or faker. Unique fields stay unique, and with a seed the same rules give the same data. Rules on foreign keys are ignored, since those fields hold the id of a related record. VS Code checks the options as you type; a rule naming a model or field that doesn't exist, or with a bad option, is reported when you generate, and the other rules still apply.

Passwords

Fields named password (configurable with mockDataGenerator.password.fieldNames) get a bcrypt hash of P@ssw0rd, so you can log in as any generated user with that password. Change it with mockDataGenerator.password.fixedValue, or turn hashing off with mockDataGenerator.password.enabled.

Images

Avatar and image fields get URLs from DiceBear or Pravatar for avatars, and Lorem Picsum for other images. The extension does not download anything while generating, but the images load from those services wherever the URLs are shown, including the image preview that opens after generation (turn it off with mockDataGenerator.imageGeneration.previewInVSCode).

Extension Settings

  • mockDataGenerator.recordsPerModel: default number of records per model
  • mockDataGenerator.modelRecordCounts: fixed counts for specific models, e.g. { "User": 10, "Order": 30 }
  • mockDataGenerator.seed: random seed for reproducible data
  • mockDataGenerator.previewBeforeInsert: when to preview the data before writing it, see Preview
  • mockDataGenerator.readConnectionFiles: offer the databases your .env and compose files point at (default true), see Repositories with several services
  • mockDataGenerator.modelFilePatterns: glob patterns for model files
  • mockDataGenerator.sqlFilePatterns: glob patterns for the .sql and code files to read tables from ([] for none), see Tables created with SQL
  • mockDataGenerator.excludePatterns: glob patterns for files to skip
  • mockDataGenerator.excludedModels: models to leave out
  • mockDataGenerator.excludedFields: fields to leave out, per model
  • mockDataGenerator.fieldRules: values for particular fields, see Field Rules
  • mockDataGenerator.useContextualData: choose values from the field name (on by default)
  • mockDataGenerator.password.*: password hashing, see Passwords
  • mockDataGenerator.localization.enabled / .locale: names, addresses and currency for en_US, fr_FR or ja_JP
  • mockDataGenerator.imageGeneration.*: image URL services, sizes and the preview
  • mockDataGenerator.logLevel: how much goes to the "Mock Data Generator" output channel

Commands

Command Description
Mock Data Generator: Generate Mock Data Generate data from your models
Mock Data Generator: Generate from Database Schema Read a database's tables and fill them (no model files needed)
Mock Data Generator: Export Last Generated Data Show the last generated data in another format
Mock Data Generator: Visualize Models Diagram of your models as Mermaid, an HTML page or JSON
Mock Data Generator: Preview Images Show the image URLs in the open file
Mock Data Generator: Configure Settings Open the extension's settings
Mock Data Generator: Check Docker Availability Check whether Docker is running
Mock Data Generator: Create Database Container Start a database container
Mock Data Generator: Manage Database Containers Copy a container's connection string again, start, stop or remove it, or view its logs
Mock Data Generator: Generate Docker Compose File Write a Docker Compose file for the databases

The Mock Data Generator view in the Activity Bar lists the same actions, the models found and the database containers; click a container to start, stop, remove it or view its logs.

Privacy and Telemetry

The extension does not collect telemetry or send your code anywhere. It only connects to the databases you give it, and to Docker when you ask for a container. Generating from a database schema reads table structure only. For MongoDB it reads a sample of documents to find their fields, and the sampled values are not kept. To offer connections it reads your .env and compose files, on your machine only and inside the workspace only; it uses their database settings alone, and only to connect when you pick one (see Your .env files stay on your machine, or turn it off with mockDataGenerator.readConnectionFiles). Generated image URLs point at the services listed under Images.

Feedback and Contributing

Bug reports, feature requests, questions and code suggestions go to the community repository. Pre-release builds are announced there too, for anyone who wants to test new features first.

License

Proprietary, free to use. The license ships with the extension (the License link on the Marketplace page). Versions 2.2.1 and earlier were released under the MIT License.

Acknowledgments

  • Built with TypeScript
  • Uses Faker for data generation
  • SQLite through sql.js
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft