VSCode goplugin cant debug


I’m trying to run tyk-gateway in debug mode in VSCode.
The startup configuration is as follows

    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
            "name": "Launch file",
            "type": "go",
            "request": "launch",
            "mode": "debug",
            "program": "${workspaceRoot}",
            "args": [
            "buildFlags": "-tags goplugin -mod vendor"

The configuration of tyk-gateway is as follows:

    "log_level": "debug",

    "app_path": "./apps",
    "template_path": "./templates",
    "middleware_path": "./middleware",
    "pid_file_location": "./tyk-gateway.pid",
    "listen_address": "",
    "listen_port": 9090,
    "secret": "blabla",
    "node_secret": "blabla",
    "use_db_app_configs": false,
    "storage": {
      "type": "redis",
      "host": "localhost",
      "port": 6378,
      "username": "",
      "password": "",
      "database": 0,
      "optimisation_max_idle": 2000,
      "optimisation_max_active": 4000,
      "enable_cluster": false
    "policies": {
      "policy_source": "rpc",
      "policy_record_name": "tyk_policies"
    "enable_analytics": true,
    "health_check": {
      "enable_health_checks": true,
      "health_check_value_timeouts": 60
    "dns_cache": {
      "enabled": false,
      "ttl": 3600,
      "check_interval": 60
    "optimisations_use_async_session_write": true,
    "allow_master_keys": false,
    "slave_options": {
      "use_rpc": true,
      "rpc_key": "blabla",
      "api_key": "blabla",
      "connection_string": "localhost:9091",
      "enable_rpc_cache": true,
      "bind_to_slugs": false,
      "group_id": "",
      "use_ssl": false,
      "ssl_insecure_skip_verify": true
    "auth_override": {
      "force_auth_provider": true,
      "auth_provider": {
        "name": "",
        "storage_engine": "rpc",
        "meta": {}
    "hash_keys": true,
    "hash_key_function": "murmur32",
    "suppress_redis_signal_reload": false,
    "force_global_session_lifetime": false,
    "max_idle_connections_per_host": 500

As soon as I add middleware from go plugin with this structure

"custom_middleware": {
      "pre": null,
      "post": [],
      "post_key_auth": null,
      "auth_check": {
        "name": "",
        "path": "",
        "require_session": false,
        "raw_body_only": false
      "response": [
          "name": "ValidateResponseSizeLimit",
          "path": "./middleware/plugin.so",
          "require_session": false,
          "raw_body_only": false
      "driver": "goplugin",
      "id_extractor": {
        "extract_from": "",
        "extract_with": "",
        "extractor_config": null

I get a fatal error: runtime: no plugin module data

If I do the same in container, everything works fine.

Hello! Thank you for your patience on this. This could be related to a compatibility issue with the go version. At the moment, tyk supports version 1.12.

Please make sure you are using version 1.12 on your local environment, and let us know if this information helps.



We are using version 3.2.2 and apparently 1.15 is supported
And I wrote about everything working fine in the container, it seems that the problem is exactly that the gateway is running in debug ide mode