Embed Repl.it error and Spotlight page problem

Since January 1, a problem has arisen. My REPL codes embedded on my page have stopped working correctly. Firstly, the RUN button disappeared, and secondly, on all C++ repositories, my specified code is not immediately displayed – instead of main.cpp, Makefile always shows up as default file
If possible, give me a solution to open the main.cpp file directly.

Okay, I understand why this is done – to reduce the load on the server, but why did the RUN button also disappear on the Spotlight page!!! Does that mean I can’t try the code without fork at all? If so, half of the server’s advantages are lost due to the removal of this function…

Repl link:

<iframe src="https://replit.com/@AleksandrIgume1/DequePvz1?embed=true#main.cpp" ></iframe>

:wave: Welcome @AleksandrIgume1!

Could you try putting this line in the (hidden) .replit file?:

entrypoint = "main.cpp"


This line already exists. If I am working with a multi-file program, how can I open another file directly?

This is my .replit file:

compile = "make -s"
run = "./main"
entrypoint = "main.cpp"
hidden = ["main", "**/*.o", "**/*.d", ".ccls-cache", "Makefile"]

channel = "stable-22_11"

requiredFiles = [".replit", "replit.nix", ".ccls-cache"]

support = true

command = ["make", "main-debug"]
noFileArgs = true

transport = "stdio"
startCommand = ["dap-cpp"]

command = "initialize"
type = "request"

adapterID = "cppdbg"
clientID = "replit"
clientName = "replit.com"
columnsStartAt1 = true
linesStartAt1 = true
locale = "en-us"
pathFormat = "path"
supportsInvalidatedEvent = true
supportsProgressReporting = true
supportsRunInTerminalRequest = true
supportsVariablePaging = true
supportsVariableType = true

command = "launch"
type = "request"

MIMode = "gdb"
arg = []
cwd = "."
environment = []
externalConsole = false
logging = {}
miDebuggerPath = "gdb"
name = "g++ - Build and debug active file"
program = "./main-debug"
request = "launch"
setupCommands = [
	{ description = "Enable pretty-printing for gdb", ignoreFailures = true, text = "-enable-pretty-printing" }
stopAtEntry = false
type = "cppdbg"


pattern = "**/*.{cpp,h}"

start = "ccls"

Replit will also show a readme.md file by default too, I think.

For me no. Only Makefile. Because by default it not required :slight_smile:

For new repository to. I have same issue - Makefile always shows up as default file.
In .replit file exist entrypoint = “main.cpp”, but repl ignore this command… On Cover page same issue…

After I add readme.md file it always show it, but not my main.cpp…

So, for Makefile problem not exist any solution?

Publishing of sollution has same problem, always Makefile displayed…

Note that the page anchors first to the expected file and then to the first file in lexicographic order. You could temporarily rename main.cpp to something like !.cpp (and change the entrypoint accordingly).

1 Like

Not help… Always Makefile is displayed…

it works for the Spotlight page on my repls when I test it. By “temporarily” I meant “until the bug is fixed”: it won’t work if you rename the file back. Also ensure that the URL you’re using ends with the hash #!.cpp[1]

  1. (or, alternatively, doesn’t contain a hash, but that could be less reliable) ↩︎

1 Like

Doesn’t work for me… Same problem after the fix… On startup it opens the #!.cpp file and automatically switches to #Makefile . Looks like an automatic redirect…

so it doesn’t make any difference from before. This behaviour is what should only happen if the file path you’re pointing to doesn’t exist.
It seems that capital letters precede ! in the order used. There may be a better way, but you can downcase the first letter of whichever file Replit decides to show (and change the hidden in the .replit file accordingly).

alternatively, publish the repl and set the cover page to show the main file


Publish your Repl, then click File on the Cover Page section and select your main.cpp:

1 Like