Surviving in space (a vacuum) is fortunately not that hard, the dangers are exaggerated in fiction.
How I would go about this is making whale-like modifications to humans, in many ways going from a high pressure environment to low pressure, is not too different to going from a low pressure to vacuum. So all the tricks which deep sea diving mammals such as whales use to retain functioning for minutes or hours under the sea, could be implemented to improve human functioning under extreme pressure and oxygenless environments.
This includes:
1) Resistance to the bends.
2) The ability to store (or economize on) oxygen.
3) The ability to collapse the lungs.
4) Modifications to ensure the ongoing functioning of the cardiovascular system even under extreme conditions, much like the whales do it.
The next point of vulnerability is the eyes in particular, as the moisture rapidly boils away. A biological mechanism which could help is a tough transparent inner eyelid, such as many reptiles and fish have. By sitting flush against the eyeball, it would help protect against the vacuum, while the human could retain vision.
For more comfortable functioning in vacuum, it would likely be necessary to generally toughen up and improve the seal of the skin, we might want features such as ears and nostrils which can be closed tightly, thus protecting the delicate membranes within. In a vacuum we have no use for the ears or nose.
With relatively simple modifications like this, it wouldn't be healthy to be in a vacuum, but functioning may be retained.
If you want much longer functioning, one of the major issues is going to be oxygen. You simply need to store more of it. Whales can do up to 2 hours. It would probably be possible to push it even further with further modifications. Ultimately though there is no way to get oxygen in a vacuum, so a human is stuck with what they can store in their body. Also, as the human isn't breathing, it is also necessary to store CO2 in the body, until such time as the lungs can operate again. This CO2 makes for another constraint.
The other problem is temperature regulation, unless exposed to direct sunlight, the greater problem is going to be getting rid of excess heat, as vacuum is highly insulative. Sweating would continue to function, as water evaporates just fine in a vacuum. This then places another constraint on maximum duration - the amount of water we can store in our body, and stand to lose without passing out.
With a full suite of whale-like modifications, plus additional modifications for exposure to vacuum, a human probably could remaining functioning for about one hour in hard vacuum. Longer than that would likely require mechanical or nano augmentation, such as a unit capable of removing CO2 and replenishing oxygen in the bloodstream. Note that a human uses non-trivial quantities of oxygen, about 20L an hour, even with efficiency improvements storing oxygen is going to become a problem, and rather than storage you might be looking at some kind of externally powered unit which processes CO2 into carbon and Oxygen, thus giving extended operation without external oxygen. Biologically this process is called photosynthesis, and sunlight is available in space, but grafting vacuum-tolerant branches onto a person's back, and then putting them in the sun, would introduce a host of other problems. But in principle a well designed photosynthetic human might be able to operate in vacuum for extended periods, it's just the skin wouldn't have enough surface area - an entire mature tree only produces oxygen at about the same rate as one human burns it, so you would need a massively more efficient process, and it would need to operate in hard vacuum.
So actually both oxygen storage, and oxygen recycling, would be problematic, making for something of a limit on how long a human could function in vacuum, without adding hundreds of kgs of mass onto him.